diff --git a/Makefile b/Makefile
index 64271e06170..f2c7d4bfd4f 100644
--- a/Makefile
+++ b/Makefile
@@ -109,6 +109,7 @@ MKDMADATA := tools/mkdmadata
ELF2ROM := tools/elf2rom
ZAPD := tools/ZAPD/ZAPD.out
FADO := tools/fado/fado.elf
+SEQ_ASM := tools/assemble_sequence
ifeq ($(COMPILER),gcc)
OPTFLAGS := -Os -ffast-math -fno-unsafe-math-optimizations
@@ -158,7 +159,10 @@ else
SRC_DIRS := $(shell find src -type d)
endif
-ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/text")
+ASSET_BIN_DIRS := $(shell find assets/code/* assets/misc/* assets/objects/* assets/overlays/* assets/scenes/* assets/textures/* -type d)
+SEQUENCE_DIR := assets/sequences
+SOUNDFONT_DIR := assets/soundfonts
+SAMPLES_DIR := $(shell find assets/samples/* -type d)
ASSET_FILES_XML := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.xml))
ASSET_FILES_BIN := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.bin))
ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_XML:.xml=.c),$f) \
@@ -168,10 +172,17 @@ ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_XML:.xml=.c),$f) \
UNDECOMPILED_DATA_DIRS := $(shell find data -type d)
# source files
+SEQ_FILES := $(foreach dir,$(SRC_DIRS) $(SEQUENCE_DIR),$(wildcard $(dir)/*.mus))
+FONT_FILES := $(foreach dir,$(SOUNDFONT_DIR),$(wildcard $(dir)/*.xml))
+AIFC_FILES := $(foreach dir,$(SAMPLES_DIR),$(wildcard $(dir)/*.aifc))
+INC_FILES := $(foreach f,$(SEQ_FILES:.mus=.inc),build/include/$f)
+BANK_OUT := $(foreach dir,$(SAMPLES_DIR:.=.o),build/assets/samplebanks/$(dir))
+MUS_OUT := $(foreach f,$(SEQ_FILES:.mus=.o),build/$f)
C_FILES := $(foreach dir,$(SRC_DIRS) $(ASSET_BIN_DIRS),$(wildcard $(dir)/*.c))
S_FILES := $(foreach dir,$(SRC_DIRS) $(UNDECOMPILED_DATA_DIRS),$(wildcard $(dir)/*.s))
O_FILES := $(foreach f,$(S_FILES:.s=.o),build/$f) \
$(foreach f,$(C_FILES:.c=.o),build/$f) \
+ $(foreach f,$(FONT_FILES:.xml=.o),build/$f) \
$(foreach f,$(wildcard baserom/*),build/$f.o)
OVL_RELOC_FILES := $(shell $(CPP) $(CPPFLAGS) $(SPEC) | grep -o '[^"]*_reloc.o' )
@@ -187,6 +198,7 @@ TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),build/$f) \
$(foreach f,$(TEXTURE_FILES_JPG:.jpg=.jpg.inc.c),build/$f) \
# create build directories
+$(shell mkdir -p build/baserom build/assets/text build/assets/data assets/sequences assets/soundfonts assets/samples)
$(shell mkdir -p build/baserom build/assets/text $(foreach dir,$(SRC_DIRS) $(UNDECOMPILED_DATA_DIRS) $(ASSET_BIN_DIRS),build/$(dir)))
ifeq ($(COMPILER),ido)
@@ -246,6 +258,9 @@ clean:
assetclean:
$(RM) -r $(ASSET_BIN_DIRS)
+ $(RM) -r $(SOUNDFONT_DIR)
+ $(RM) $(shell find $(SEQUENCE_DIR)/*.seq -not -path "*.prg.seq")
+ $(RM) -r assets/samples/
$(RM) -r assets/text/*.h
$(RM) -r build/assets
$(RM) -r .extracted-assets.json
@@ -259,6 +274,8 @@ setup:
python3 fixbaserom.py
python3 extract_baserom.py
python3 extract_assets.py -j$(N_THREADS)
+ python3 tools/disassemble_sound.py MQDebug baserom/code baserom/Audiotable baserom/Audiobank assets/xml assets/samples assets/soundfonts build/include
+ python3 tools/disassemble_sequences.py MQDebug baserom/code baserom/Audioseq assets/xml/sequences/Sequences.xml build/include include/sequence.inc assets/sequences
test: $(ROM)
$(EMULATOR) $(EMU_FLAGS) $<
@@ -271,7 +288,7 @@ test: $(ROM)
$(ROM): $(ELF)
$(ELF2ROM) -cic 6105 $< $@
-$(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(OVL_RELOC_FILES) build/ldscript.txt build/undefined_syms.txt
+$(ELF): audio_tables $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(MUS_OUT) $(OVL_RELOC_FILES) build/ldscript.txt build/undefined_syms.txt
$(LD) -T build/undefined_syms.txt -T build/ldscript.txt --no-check-sections --accept-unknown-input-arch --emit-relocs -Map build/z64.map -o $@
## Order-only prerequisites
@@ -284,6 +301,8 @@ $(OVL_RELOC_FILES): | o_files
asset_files: $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT)
$(O_FILES): | asset_files
+audio_tables: build/assets/data/SequenceTable.o build/assets/data/SoundFontTable.o
+
.PHONY: o_files asset_files
build/$(SPEC): $(SPEC)
@@ -343,6 +362,18 @@ build/src/overlays/%_reloc.o: build/$(SPEC)
$(FADO) $$(tools/reloc_prereq $< $(notdir $*)) -n $(notdir $*) -o $(@:.o=.s) -M $(@:.o=.d)
$(AS) $(ASFLAGS) $(@:.o=.s) -o $@
+build/assets/data/SequenceTable.o: $(MUS_OUT)
+ python3 tools/assemble_sequences.py $(SEQUENCE_DIR) build/include build
+
+build/assets/data/SoundFontTable.o: $(FONT_FILES) $(AIFC_FILES)
+ python3 tools/assemble_sound.py $(SOUNDFONT_DIR) build/assets build/include assets/samples --build-bank --match=ocarina
+
+build/%.o: %.seq
+ $(SEQ_ASM) $< $@ --font-path build/include --elf big 32 mips
+
+build/include/%.inc: $(FONT_FILES)
+ python3 tools/assemble_font_includes.py $(SOUNDFONT_DIR) build/include
+
build/%.inc.c: %.png
$(ZAPD) btex -eh -tt $(subst .,,$(suffix $*)) -i $< -o $@
diff --git a/assets/.gitignore b/assets/.gitignore
index e5633a6496a..511fc0a65dd 100644
--- a/assets/.gitignore
+++ b/assets/.gitignore
@@ -1,7 +1,27 @@
+# Raw binary files included with assets
*.bin
+# C code representing asset data
*.c
+# But not for text code
!text/*.c
+# Headers representing asset data
*.h
-*.cfg
+# Vertex arrays
*.vtx.inc
+# Display lists
*.dlist.inc
+# Binary representation of a music sequence
+*.aseq
+# Music sequence
+*.seq
+# Uncompressed audio
+*.aiff
+# Compressed audio
+*.aifc
+
+# XML indicating sequences that are purely references to other sequences
+/sequences/References.xml
+# Soundfont XMLs
+/soundfonts/*.xml
+# Sample Bank Descriptor XML
+/samples/Banks.xml
diff --git a/assets/sequences/000_Sound_Effects.prg.seq b/assets/sequences/000_Sound_Effects.prg.seq
new file mode 100644
index 00000000000..0a8ffe0971d
--- /dev/null
+++ b/assets/sequences/000_Sound_Effects.prg.seq
@@ -0,0 +1,1002 @@
+.desc title "Sound Effects"
+.desc type "program"
+.cache CACHE_PERMANENT
+.usefont SOUNDFONT_SFX_2
+.usefont SOUNDFONT_SFX_1
+
+.sequence sequence_start
+mutebhv 0x60
+mutescale 0
+vol 127
+tempo 120
+initchan 0xFFF
+ldchan 0, channel_player0
+ldchan 1, channel_player1
+ldchan 2, channel_player2
+ldchan 3, channel_item0
+ldchan 4, channel_item1
+ldchan 5, channel_env0
+ldchan 6, channel_env1
+ldchan 7, channel_env2
+ldchan 8, channel_enemy0
+ldchan 9, channel_enemy1
+ldchan 10, channel_enemy2
+ldchan 11, channel_system
+ldchan 12, channel_system
+ldchan 13, channel_ocarina
+ldchan 14, channel_voice0
+ldchan 15, channel_voice1
+.sequence seq_loop
+delay 32720
+rjump seq_loop
+
+# Delay for a number of ticks (1-255) in an interruptible manner.
+.channel delay
+stseq 0, @+1
+loop 20
+rjump delay_iter
+
+# Delay for a number of ticks (1-255) in an interruptible manner,
+# with volume controlled by io port 2 and filter by port 3.
+.channel delay_varyingvol
+stseq 0, @+1
+loop 20
+ldio 3
+stseq 0, @+1
+filter 0
+ldio 2
+rbltz delay_iter
+stseq 0, @+1
+vol 127
+.channel delay_iter
+delay1
+ldio 0
+stio 0 # ports 0 and 1 are reset to -1 when read; restore the value
+sub 255
+rbeqz delay_skip
+rjump delay_interrupt
+.channel delay_skip
+loopend
+end
+.channel delay_interrupt
+ldio 0
+stio 0 # ports 0 and 1 are reset to -1 when read; restore the value
+break # break out of the loop
+break # force the caller to return immediately
+dellayer 0
+dellayer 1
+dellayer 2
+dellayer 3
+end
+
+.channel setup_chan_common
+noshort
+mutebhv 0x20
+effects 128
+notepri 14
+rvrbidx 1
+end
+
+.channel start_playing_common
+dellayer 0
+dellayer 1
+ldi 0
+gain 0
+stio 1 # set status = 0 (playing)
+end
+
+.channel varyvol
+ldio 2
+rbltz varyvol_skip
+stseq 0, @+1
+vol 127
+.channel varyvol_skip
+end
+
+# Main loop for BANK_PLAYER
+.channel channel_player0
+ldfilter filter_player0
+rjump channel_player
+
+.channel channel_player1
+ldfilter filter_player1
+rjump channel_player
+
+.channel channel_player2
+ldfilter filter_player2
+
+.channel channel_player
+call setup_chan_common
+filter 0
+font SOUNDFONT_SFX_1
+panweight 127
+
+.channel main_loop_player
+delay1
+ldio 0
+sub 1
+beqz start_playing_player
+jump main_loop_player
+
+.channel start_playing_player
+call start_playing_common
+dellayer 2
+vibdepth 0
+ldio 4 # read sound id from port 4
+bgez part1_player
+and 127
+dyntbl table_player_old
+jump use_table_player
+
+.channel part1_player
+dyntbl table_player_kid
+
+.channel use_table_player
+dyncall
+
+.channel poll_player
+ldio 3
+stseq 0, @+1
+filter 15
+call varyvol
+delay1
+ldio 0
+rbeqz force_stop_player # told to stop
+rbltz skip_player
+rjump start_playing_player # told to play something else
+
+.channel skip_player
+testlayer 0
+rbeqz poll_player # if layer 0 hasn't finished, keep polling
+ldi 255
+stio 1 # set status = -1 (stopped)
+
+.channel force_stop_player
+dellayer 0
+dellayer 1
+dellayer 2
+rjump main_loop_player
+
+.include "sfxbanks/player.seq.inc"
+
+# Main loop for BANK_ITEM
+.channel channel_item0
+ldfilter filter_item0
+rjump channel_item
+
+.channel channel_item1
+ldfilter filter_item1
+
+.channel channel_item
+dyntbl table_item
+call setup_chan_common
+font SOUNDFONT_SFX_1
+panweight 127
+filter 0
+
+.channel main_loop_item
+delay1
+ldio 0
+sub 1
+rbeqz start_playing_item
+rjump main_loop_item
+
+.channel start_playing_item
+call start_playing_common
+dellayer 2
+vibdepth 0
+ldio 4
+dyncall
+
+.channel poll_item
+ldio 3
+stseq 0, @+1
+filter 15
+call varyvol
+delay1
+ldio 0
+rbeqz force_stop_item
+rbltz skip_item
+rjump start_playing_item
+
+.channel skip_item
+testlayer 0
+rbeqz poll_item
+ldi 255
+stio 1
+
+.channel force_stop_item
+dellayer 0
+dellayer 1
+dellayer 2
+ldi 0
+rjump main_loop_item
+
+.include "sfxbanks/item.seq.inc"
+
+# Main loop for BANK_ENV
+.channel channel_env0
+ldfilter filter_env0
+rjump channel_env
+
+.channel channel_env1
+ldfilter filter_env1
+rjump channel_env
+
+.channel channel_env2
+ldfilter filter_env2
+
+.channel channel_env
+call setup_chan_common
+font SOUNDFONT_SFX_1
+filter 0
+vibdelay 0
+
+.channel main_loop_env
+delay1
+ldio 0
+sub 1
+rbeqz start_playing_env
+rjump main_loop_env
+
+.channel start_playing_env
+vibdepth 0
+notealloc 0
+freenotelist
+panweight 127
+call start_playing_common
+dellayer 2
+ldio 4
+bgez part1_env
+and 127
+dyntbl table_env+0x100
+rjump use_table_env
+
+.channel part1_env
+dyntbl table_env
+
+.channel use_table_env
+dyncall
+
+.channel poll_env
+ldio 3
+stseq 0, @+1
+filter 0
+call varyvol
+delay1
+ldio 0
+rbeqz force_stop_env
+rbltz skip_env
+rjump start_playing_env
+
+.channel skip_env
+testlayer 0
+rbeqz poll_env
+ldi 255
+stio 1
+
+.channel force_stop_env
+dellayer 0
+dellayer 1
+dellayer 2
+rjump main_loop_env
+
+.include "sfxbanks/env.seq.inc"
+
+# Main loop for BANK_ENEMY
+.channel channel_enemy0
+ldfilter filter_enemy0
+rjump channel_enemy
+
+.channel channel_enemy1
+ldfilter filter_enemy1
+rjump channel_enemy
+
+.channel channel_enemy2
+ldfilter filter_enemy2
+
+.channel channel_enemy
+call setup_chan_common
+font SOUNDFONT_SFX_2
+filter 0
+
+.channel main_loop_enemy
+delay1
+ldio 0
+sub 1
+beqz start_playing_enemy
+jump main_loop_enemy
+
+.channel start_playing_enemy
+call start_playing_common
+dellayer 2
+dellayer 3
+vibdepth 0
+gain 0
+panweight 127
+ldio 5
+sub 1
+rbeqz part3or4_enemy
+ldio 4
+bgez part1_enemy
+and 127
+dyntbl table_enemy+0x100
+rjump use_table_enemy
+
+.channel part3or4_enemy
+dyntbl table_enemy+0x200
+ldio 4
+bgez use_table_enemy
+and 127
+dyntbl table_enemy+0x300
+rjump use_table_enemy
+
+.channel part1_enemy
+dyntbl table_enemy
+
+.channel use_table_enemy
+env envelope_6A7C
+releaserate 251
+dyncall
+
+.channel poll_enemy
+ldio 3
+stseq 0, @+1
+filter 15
+call varyvol
+delay1
+ldio 0
+rbeqz force_stop_enemy
+rbltz skip_enemy
+rjump start_playing_enemy
+
+.channel skip_enemy
+testlayer 0
+rbeqz poll_enemy
+ldi 255
+stio 1
+
+.channel force_stop_enemy
+dellayer 0
+dellayer 1
+dellayer 2
+dellayer 3
+rjump main_loop_enemy
+
+.include "sfxbanks/enemy.seq.inc"
+
+# Main loop for BANK_SYSTEM
+.channel channel_system
+dyntbl table_system
+noshort
+mutebhv 0x0
+notepri 14
+rvrbidx 1
+effects 0
+font SOUNDFONT_SFX_1
+panweight 0
+.channel main_loop_system
+delay1
+ldio 0
+sub 1
+beqz start_playing_system
+jump main_loop_system
+
+.channel start_playing_system
+reverb 0
+call start_playing_common
+dellayer 2
+ldio 4
+dyncall
+
+.channel poll_system
+call varyvol
+delay1
+ldio 0
+rbeqz force_stop_system
+rbltz skip_system
+rjump start_playing_system
+
+.channel skip_system
+testlayer 0
+beqz poll_system
+ldi 255
+stio 1
+
+.channel force_stop_system
+dellayer 0
+dellayer 1
+dellayer 2
+rjump main_loop_system
+
+.include "sfxbanks/system.seq.inc"
+
+# Main loop for BANK_OCARINA
+.channel channel_ocarina
+dyntbl table_ocarina
+noshort
+font SOUNDFONT_SFX_1
+panweight 127
+mutebhv 0x0
+effects 128
+notepri 14
+
+.channel main_loop_ocarina
+delay1
+ldio 1
+rbltz reservenotes_skip_ocarina # -1 => maintain old reservation status
+rbeqz unreservenotes_ocarina # 0 => unreserve notes
+allocnotelist 1 # 1 => reserve notes
+notealloc 2
+rjump reservenotes_skip_ocarina
+
+.channel unreservenotes_ocarina
+freenotelist
+notealloc 0
+
+.channel reservenotes_skip_ocarina
+ldio 0
+sub 1
+rbeqz start_playing_ocarina
+rjump main_loop_ocarina
+
+.channel start_playing_ocarina
+vibdepth 0
+rvrbidx 0
+dellayer 0
+ldi 0
+stio 6
+ldio 4
+dyncall
+
+.channel poll_ocarina
+ldio 2
+rbltz changevol_skip_ocarina
+stseq 0, @+1
+vol 127
+
+.channel changevol_skip_ocarina
+delay1
+ldio 0
+rbeqz force_stop_ocarina
+rbltz skip_ocarina
+rjump start_playing_ocarina
+
+.channel skip_ocarina
+testlayer 0
+rbeqz poll_ocarina
+ldi 255
+stio 1 # set status = -1 (finished)
+
+.channel force_stop_ocarina
+dellayer 0
+rjump main_loop_ocarina
+
+.include "sfxbanks/ocarina.seq.inc"
+
+# Main loop for BANK_VOICE
+.channel channel_voice0
+ldfilter filter_voice0
+rjump channel_voice
+
+.channel channel_voice1
+ldfilter filter_voice1
+
+.channel channel_voice
+call setup_chan_common
+instr FONTANY_INSTR_SFX
+env envelope_65D0
+releaserate 251
+bend 0
+filter 0
+effects 128
+allocnotelist 1
+
+.channel main_loop_voice
+delay1
+ldio 0
+sub 1
+rbeqz start_playing_voice
+rjump main_loop_voice
+
+.channel start_playing_voice
+dellayer 0
+dellayer 1
+ldi 0
+stio 1 # set status = 0 (playing)
+ldio 4 # read sound id from port 4
+bgez part1_voice
+and 127
+dyntbl table_voice+0x100
+rjump use_table_voice
+
+.channel part1_voice
+dyntbl table_voice
+
+.channel use_table_voice
+dyncall
+
+.channel poll_voice
+ldio 3
+stseq 0, @+1
+filter 15
+call varyvol
+delay1
+ldio 0
+rbeqz force_stop_voice
+rbltz skip_voice
+rjump start_playing_voice
+
+.channel skip_voice
+testlayer 0
+rbeqz poll_voice
+ldi 255
+stio 1 # set status = -1 (finished)
+
+.channel force_stop_voice
+dellayer 0
+dellayer 1
+rjump main_loop_voice
+
+.include "sfxbanks/voice.seq.inc"
+
+.envelope envelope_65D0
+point 1, 32700
+hang
+
+.envelope envelope_65D8
+point 1, 32700
+point 100, 30000
+point 200, 5000
+hang
+
+.envelope envelope_65E8
+point 1, 32700
+point 25, 25000
+point 100, 25000
+point 200, 5000
+hang
+
+.envelope envelope_65FC
+point 1, 32700
+point 100, 30000
+point 250, 30000
+point 200, 5000
+hang
+
+.envelope envelope_6610
+point 1, 32700
+point 50, 30000
+point 100, 10000
+point 100, 0
+hang
+
+.envelope envelope_6624
+point 1, 32700
+point 30, 30000
+point 50, 10000
+point 50, 0
+hang
+
+.envelope envelope_6638
+point 1, 32700
+point 70, 30000
+point 120, 10000
+point 120, 0
+hang
+
+.envelope envelope_664C
+point 1, 32700
+point 15, 32700
+point 15, 22000
+point 100, 15000
+hang
+
+.envelope envelope_6660
+point 1, 32700
+point 8, 32700
+point 8, 22000
+point 100, 15000
+hang
+
+.envelope envelope_6674
+point 10, 32700
+hang
+
+.envelope envelope_667C
+point 30, 10000
+point 30, 32700
+hang
+
+.envelope envelope_6688
+point 20, 15000
+point 10, 32700
+hang
+
+.envelope envelope_6694
+point 48, 10000
+point 32, 32700
+hang
+
+.envelope envelope_66A0
+point 47, 15000
+point 13, 32700
+point 72, 10000
+hang
+
+.envelope envelope_66B0
+point 6, 32700
+hang
+
+.envelope envelope_66B8
+point 20, 32700
+point 50, 10000
+point 40, 0
+hang
+
+.envelope envelope_66C8
+point 18, 32700
+hang
+
+.envelope envelope_66D0
+point 10, 32700
+point 240, 31000
+point 150, 2000
+hang
+
+.envelope envelope_66E0
+point 14, 15000
+point 13, 32700
+hang
+
+.envelope envelope_66EC
+point 40, 32700
+hang
+
+.envelope envelope_66F4
+point 400, 32700
+hang
+
+.envelope envelope_66FC
+point 100, 32700
+hang
+
+.envelope envelope_6704
+point 225, 32700
+point 30, 30000
+hang
+
+.envelope envelope_6710
+point 200, 32700
+hang
+
+.envelope envelope_6718
+point 3, 32700
+hang
+
+.envelope envelope_6720
+point 12, 32700
+point 40, 5000
+hang
+
+.envelope envelope_unused_672C
+point 10, 32700
+point 4, 20000
+point 4, 10000
+point 50, 2000
+hang
+
+.envelope envelope_6740
+point 40, 32700
+point 150, 32700
+point 300, 0
+hang
+
+.envelope envelope_6750
+point 40, 32700
+point 800, 32700
+point 100, 16000
+point 100, 32700
+point 100, 16000
+point 100, 32700
+point 100, 16000
+point 100, 32700
+point 600, 0
+hang
+
+.envelope envelope_6778
+point 200, 32700
+point 100, 16000
+point 100, 32700
+point 100, 16000
+point 100, 32700
+point 600, 0
+hang
+
+.envelope envelope_6794
+point 35, 32700
+point 40, 32700
+point 105, 0
+hang
+
+.envelope envelope_67A4
+point 1, 25000
+point 12, 32700
+point 40, 32700
+point 60, 15000
+point 80, 5000
+hang
+
+.envelope envelope_67BC
+point 10, 32700
+point 50, 32700
+point 60, 5000
+hang
+
+.envelope envelope_67CC
+point 200, 32700
+point 340, 0
+hang
+
+.envelope envelope_67D8
+point 400, 32700
+point 400, 20000
+goto 0
+
+.envelope envelope_67E4
+point 1400, 32700
+point 400, 14000
+point 400, 32700
+goto 1
+
+.envelope envelope_67F4
+point 25, 32700
+point 490, 12000
+hang
+
+.envelope envelope_6800
+point 100, 32700
+point 450, 32700
+
+.envelope envelope_6808
+point 150, 32700
+point 1200, 32700
+point 400, 20000
+hang
+
+.envelope envelope_6818
+point 200, 32700
+point 200, 20000
+goto 0
+
+.envelope envelope_6824
+point 2, 25000
+hang
+
+.envelope envelope_682C
+point 1, 32700
+point 100, 30000
+point 200, 5000
+hang
+
+.envelope envelope_683C
+point 1, 32700
+point 100, 30000
+point 100, 0
+hang
+
+.envelope envelope_684C
+point 50, 32700
+point 160, 30000
+point 100, 0
+hang
+
+.envelope envelope_unused_685C
+point 50, 32700
+point 100, 30000
+point 200, 20000
+hang
+
+.envelope envelope_686C
+point 20, 32700
+point 100, 30000
+point 200, 20000
+hang
+
+.envelope envelope_687C
+point 1, 32700
+point 100, 30000
+point 200, 20000
+hang
+
+.envelope envelope_688C
+point 10, 32700
+point 250, 32700
+point 100, 20000
+hang
+
+.envelope envelope_unused_689C
+point 15, 32700
+point 55, 20000
+point 15, 5000
+hang
+
+.envelope envelope_68AC
+point 150, 32700
+hang
+
+.envelope envelope_68B4
+point 120, 32700
+hang
+
+.envelope envelope_68BC
+point 60, 32700
+point 250, 32700
+point 100, 20000
+hang
+
+.envelope envelope_68CC
+point 25, 32700
+point 100, 32700
+point 20, 2000
+hang
+
+.envelope envelope_68DC
+point 1, 32700
+point 50, 32700
+point 25, 16000
+hang
+
+.envelope envelope_68EC
+point 1, 32700
+point 80, 32700
+point 25, 16000
+hang
+
+.envelope envelope_68FC
+point 1, 32700
+point 20, 32700
+point 7, 16000
+hang
+
+.envelope envelope_690C
+point 1, 32700
+point 19, 32700
+point 5, 2000
+hang
+
+.envelope envelope_unused_691C
+point 1, 32700
+point 50, 32700
+point 25, 10000
+hang
+
+.envelope envelope_692C
+point 1, 32700
+point 50, 32700
+point 20, 1000
+hang
+
+.envelope envelope_unused_693C
+point 1, 32700
+point 40, 32700
+point 10, 1000
+hang
+
+.envelope envelope_694C
+point 1, 32700
+point 70, 32700
+point 10, 5000
+hang
+
+.envelope envelope_695C
+point 1, 32700
+point 19, 32700
+point 5, 3000
+hang
+
+.envelope envelope_696C
+point 1, 32700
+point 65, 32700
+point 20, 1000
+hang
+
+.envelope envelope_697C
+point 1, 32700
+point 15, 32700
+point 2, 1000
+hang
+
+.envelope envelope_698C
+point 1, 32700
+point 250, 32700
+point 60, 16000
+hang
+
+.envelope envelope_699C
+point 1, 32700
+point 200, 32700
+point 50, 16000
+hang
+
+.envelope envelope_69AC
+point 1, 32700
+point 260, 32700
+point 60, 16000
+hang
+
+.envelope envelope_69BC
+point 1, 32700
+point 300, 32700
+point 60, 16000
+hang
+
+.envelope envelope_69CC
+point 1, 32700
+point 350, 32700
+point 150, 16000
+hang
+
+.envelope envelope_69DC
+point 1, 32700
+point 150, 32700
+point 100, 16000
+hang
+
+.envelope envelope_unused_69EC
+point 1, 32700
+point 100, 32700
+point 40, 3000
+hang
+
+.envelope envelope_69FC
+point 1, 32700
+point 210, 32700
+point 60, 16000
+hang
+
+.envelope envelope_6A0C
+point 1, 32700
+point 100, 32700
+point 100, 10000
+hang
+
+.envelope envelope_6A1C
+point 1, 32700
+point 250, 32700
+point 30, 16000
+hang
+
+.envelope envelope_6A2C
+point 1, 32700
+point 650, 32700
+point 150, 16000
+hang
+
+.envelope envelope_6A3C
+point 1, 32700
+point 500, 32700
+point 150, 16000
+hang
+
+.envelope envelope_6A4C
+point 1, 32700
+point 500, 32700
+point 200, 26000
+hang
+
+.envelope envelope_6A5C
+point 1, 32700
+point 800, 32700
+point 200, 16000
+hang
+
+.envelope envelope_unused_6A6C
+point 1, 32700
+point 900, 32700
+point 200, 30000
+hang
+
+.envelope envelope_6A7C
+point 1, 32700
+hang
diff --git a/assets/sequences/001_Ambient_Effects.prg.seq b/assets/sequences/001_Ambient_Effects.prg.seq
new file mode 100644
index 00000000000..e0dc7d8977e
--- /dev/null
+++ b/assets/sequences/001_Ambient_Effects.prg.seq
@@ -0,0 +1,2092 @@
+.desc title "Ambient Effects"
+.desc type "program"
+.usefont SOUNDFONT_AMBIENCE
+
+.sequence sequence_start
+mutebhv 0x20
+mutescale 70
+vol 115
+tempo 120
+ldio 0
+bgez seq_D
+end
+.sequence seq_D
+ldio 4
+stseq 32, seq_17+1
+ldio 5
+stseq 0, seq_17+2
+.sequence seq_17
+initchan 0xD000
+ldchan 13, chan_EDB
+ldio 5
+and 1
+rbeqz seq_25
+ldchan 0, chan_2AA
+.sequence seq_25
+ldio 5
+and 2
+rbeqz seq_2D
+ldchan 1, chan_91
+.sequence seq_2D
+ldio 5
+and 4
+rbeqz seq_35
+ldchan 2, chan_91
+.sequence seq_35
+ldio 5
+and 8
+rbeqz seq_3D
+ldchan 3, chan_91
+.sequence seq_3D
+ldio 5
+and 16
+rbeqz seq_45
+ldchan 4, chan_91
+.sequence seq_45
+ldio 5
+and 32
+rbeqz seq_4D
+ldchan 5, chan_91
+.sequence seq_4D
+ldio 5
+and 64
+rbeqz seq_55
+ldchan 6, chan_91
+.sequence seq_55
+ldio 5
+and 128
+rbeqz seq_5D
+ldchan 7, chan_91
+.sequence seq_5D
+ldio 4
+and 1
+rbeqz seq_65
+ldchan 8, chan_91
+.sequence seq_65
+ldio 4
+and 2
+rbeqz seq_6A
+.sequence seq_6A
+ldio 4
+and 4
+rbeqz seq_6F
+.sequence seq_6F
+ldio 4
+and 8
+rbeqz seq_74
+.sequence seq_74
+ldio 4
+and 16
+rbeqz seq_7C
+ldchan 12, chan_2AA
+.sequence seq_7C
+ldio 4
+and 64
+rbeqz seq_84
+ldchan 14, chan_DA3
+.sequence seq_84
+ldio 4
+and 128
+rbeqz seq_8C
+ldchan 15, chan_E0B
+.sequence seq_8C
+delay 0x7FD0
+rjump seq_8C
+
+.channel chan_91
+noshort
+rvrbidx 1
+ldfilter filter_1030
+filter 0
+.channel chan_99
+delay1
+panweight 0
+ldio 1
+sub 1
+rbeqz chan_A3
+rjump chan_99
+.channel chan_A3
+ldio 2
+sub 18
+rbltz chan_AB
+ldi 17
+stio 2
+.channel chan_AB
+ldio 2
+ldseq addr_16B
+stseq 0, chan_D7+1
+ldio 2
+ldseq addr_17F
+stseq 0, chan_D9+1
+ldio 2
+ldseqtoptr addr_192
+stptrtoseq chan_DE+1
+ldio 2
+ldseqtoptr addr_1BA
+stptrtoseq chan_E5+1
+ldio 2
+ldseqtoptr addr_1E2
+stptrtoseq chan_EC+1
+ldio 2
+ldseqtoptr addr_20A
+stptrtoseq chan_F3+1
+.channel chan_D7
+instr FONT02_INSTR_BIRD_CHIRP_0
+.channel chan_D9
+vol 60
+ldio 4
+and 3
+.channel chan_DE
+ldlayer 0, layer_393
+rbeqz chan_F9
+sub 1
+.channel chan_E5
+ldlayer 1, layer_3CE
+rbeqz chan_F9
+sub 1
+.channel chan_EC
+ldlayer 2, layer_38C
+rbeqz chan_F9
+sub 1
+.channel chan_F3
+ldlayer 3, layer_3C4
+ldi 1
+stio 7
+.channel chan_F9
+delay1
+ldio 5
+and 63
+stio 5
+ldseq addr_F7A
+stseq 10, chan_10E+1
+ldi 127
+subio 5
+stseq 0, @+1
+volexp 127
+.channel chan_10E
+reverb 0
+ldio 1
+sub 0
+rbeqz chan_164
+ldio 7
+sub 1
+stio 7
+rbeqz chan_11D
+rjump chan_F9
+.channel chan_11D
+ldio 2
+ldseqtoptr addr_232
+stptrtoseq chan_134+2
+ldio 2
+ldseqtoptr addr_25A
+stptrtoseq chan_146+2
+ldio 2
+ldseqtoptr addr_282
+stptrtoseq chan_15B+2
+rand 90
+.channel chan_134
+stseq 37, layer_fn_EFC+1
+ldio 3
+and 127
+stio 3
+ldi 0
+subio 3
+stseq 0, chan_144+1
+ldio 3
+.channel chan_144
+bendfine 0
+.channel chan_146
+stseq 0, layer_EFE+1
+ldi 0
+ldseq addr_EFB
+rbeqz chan_15B
+rand 3
+rbeqz chan_159
+ldi 0
+rjump chan_15B
+.channel chan_159
+ldi 20
+.channel chan_15B
+stseq 0, layer_F00+1
+ldi 50
+stio 7
+rjump chan_F9
+.channel chan_164
+dellayer 0
+dellayer 1
+dellayer 2
+dellayer 3
+jump chan_99
+
+.array addr_16B
+byte FONT02_INSTR_BIRD_CHIRP_0
+byte FONT02_INSTR_INSECTS
+byte FONT02_INSTR_BIRD_CHIRP_1
+byte FONT02_INSTR_BIRD_CHIRP_0
+byte FONT02_INSTR_CRICKETS
+byte FONT02_INSTR_BIRD_CHIRP_0
+byte FONT02_INSTR_BIRD_CHIRP_2
+byte FONT02_INSTR_BIRD_CHIRP_0
+byte FONT02_INSTR_BIRD_CHIRP_0
+byte FONT02_INSTR_CROWS
+byte FONT02_INSTR_BIRD_CHIRP_3
+byte FONT02_INSTR_BIRD_SCREECH
+byte FONT02_INSTR_BIRD_SONG
+byte FONT02_INSTR_OWL
+byte FONT02_INSTR_HAWK
+byte FONT02_INSTR_BIRD_CALL
+byte FONT02_INSTR_BIRD_CAW
+byte FONT02_INSTR_CUCCO
+byte FONT02_INSTR_BIRD_CHIRP_1
+byte FONT02_INSTR_BIRD_CHIRP_0
+
+.array addr_17F
+byte 0x4B
+byte 0x55
+byte 0x32
+byte 0x3C
+byte 0x50
+byte 0x50
+byte 0x50
+byte 0x50
+byte 0x50
+byte 0x64
+byte 0x50
+byte 0x50
+byte 0x50
+byte 0x52
+byte 0x50
+byte 0x4B
+byte 0x5A
+byte 0x50
+byte 0x0
+
+.table addr_192
+entry layer_393
+entry layer_404
+entry layer_48A
+entry layer_4D1
+entry layer_54E
+entry layer_5B2
+entry layer_665
+entry layer_6CE
+entry layer_734
+entry layer_78B
+entry layer_7E6
+entry layer_B39
+entry layer_C5E
+entry layer_9C2
+entry layer_A6C
+entry layer_D39
+entry layer_8A2
+entry layer_AE6
+entry layer_48A
+entry layer_4D1
+
+.table addr_1BA
+entry layer_3CE
+entry layer_449
+entry layer_487
+entry layer_516
+entry layer_560
+entry layer_612
+entry layer_676
+entry layer_6E8
+entry layer_731
+entry layer_794
+entry layer_849
+entry layer_BC9
+entry layer_CCD
+entry layer_A09
+entry layer_A59
+entry layer_D27
+entry layer_932
+entry layer_AFA
+entry layer_A59
+entry layer_D27
+
+.table addr_1E2
+entry layer_38C
+entry layer_3FD
+entry layer_484
+entry layer_4C7
+entry layer_572
+entry layer_5AC
+entry layer_68B
+entry layer_6FA
+entry layer_74E
+entry layer_7B2
+entry layer_7E0
+entry layer_B26
+entry layer_C4D
+entry layer_9B8
+entry layer_A62
+entry layer_D2A
+entry layer_898
+entry layer_AE5
+entry layer_A62
+entry layer_D2A
+
+.table addr_20A
+entry layer_3C4
+entry layer_43F
+entry layer_481
+entry layer_50C
+entry layer_58D
+entry layer_609
+entry layer_6B4
+entry layer_716
+entry layer_770
+entry layer_7C9
+entry layer_843
+entry layer_BB3
+entry layer_CB9
+entry layer_9FC
+entry layer_A4C
+entry layer_D24
+entry layer_924
+entry layer_AE5
+entry layer_A4C
+entry layer_D24
+
+.table addr_232
+entry layer_fn_EFC+1
+entry layer_fn_F03+1
+entry layer_fn_F0A+1
+entry layer_fn_F11+1
+entry layer_fn_F18+1
+entry layer_fn_F1F+1
+entry layer_fn_F26+1
+entry layer_fn_F2D+1
+entry layer_fn_F34+1
+entry layer_fn_F3B+1
+entry layer_fn_F42+1
+entry layer_fn_F49+1
+entry layer_fn_F50+1
+entry layer_fn_F57+1
+entry layer_fn_F5E+1
+entry layer_fn_F65+1
+entry layer_fn_F6C+1
+entry layer_fn_F73+1
+entry layer_fn_F0A+1
+entry layer_fn_F11+1
+
+.table addr_25A
+entry layer_EFE+1
+entry layer_F05+1
+entry layer_F0C+1
+entry layer_F13+1
+entry layer_F1A+1
+entry layer_F21+1
+entry layer_F28+1
+entry layer_F2F+1
+entry layer_F36+1
+entry layer_F3D+1
+entry layer_F44+1
+entry layer_F4B+1
+entry layer_F52+1
+entry layer_F59+1
+entry layer_F60+1
+entry layer_F67+1
+entry layer_F6E+1
+entry layer_F75+1
+entry layer_F60+1
+entry layer_F67+1
+
+.table addr_282
+entry layer_F00+1
+entry layer_F07+1
+entry layer_F0E+1
+entry layer_F15+1
+entry layer_F1C+1
+entry layer_F23+1
+entry layer_F2A+1
+entry layer_F31+1
+entry layer_F38+1
+entry layer_F3F+1
+entry layer_F46+1
+entry layer_F4D+1
+entry layer_F54+1
+entry layer_F5B+1
+entry layer_F62+1
+entry layer_F69+1
+entry layer_F70+1
+entry layer_F77+1
+entry layer_F62+1
+entry layer_F69+1
+
+.channel chan_2AA
+noshort
+rvrbidx 1
+transpose 12
+ldfilter filter_1030
+filter 0
+.channel chan_2B4
+delay1
+ldio 1
+sub 1
+rbeqz chan_2BC
+rjump chan_2B4
+.channel chan_2BC
+volexp 127
+panweight 0
+ldio 2
+and 3
+ldseq addr_35A
+stseq 0, chan_2D6+1
+ldio 2
+and 3
+ldseq addr_35E
+stseq 0, @+1
+vol 60
+.channel chan_2D6
+instr FONT02_INSTR_WIND_HOWL
+env envelope_FFA
+reverb 20
+ldlayer 0, layer_368
+ldlayer 1, layer_362
+ldi 1
+stio 7
+rjump chan_2F4
+.channel chan_2E8
+delay1
+ldio 1
+sub 0
+rbeqz chan_335
+ldio 0
+rbltz chan_2F4
+call chan_fn_33E
+.channel chan_2F4
+ldio 6
+rbltz chan_300
+stseq 0, chan_2FE+1
+ldi 255
+stio 6
+.channel chan_2FE
+filter 15
+.channel chan_300
+ldio 7
+sub 1
+stio 7
+rbeqz chan_308
+rjump chan_2E8
+.channel chan_308
+ldio 3
+and 63
+stio 3
+ldseq addr_FBA
+sub 255
+stseq 5, chan_31D+1
+ldio 3
+ldseq addr_F7A
+stseq 96, envelope_FFE+2
+.channel chan_31D
+rand 24
+stseq 98, layer_36F
+ldi 64
+subio 3
+stseq 0, @+1
+rand 64
+stseq 63, layer_36F+1
+ldi 100
+stio 7
+rjump chan_2E8
+.channel chan_335
+releaserate 112
+dellayer 0
+dellayer 1
+dellayer 2
+dellayer 3
+jump chan_2B4
+
+.channel chan_fn_33E
+ldlayer 2, layer_37A
+ldlayer 3, layer_374
+ldio 3
+and 63
+stio 3
+ldseq addr_FBA
+sub 255
+stseq 100, layer_385+2
+stseq 100, layer_388+2
+stseq 103, layer_385
+end
+
+.array addr_35A
+byte 0xF
+byte 0x10
+byte 0x11
+byte 0x11
+
+.array addr_35E
+byte 0x3C
+byte 0x73
+byte 0x64
+byte 0x64
+
+.layer layer_362
+stereo 20
+transpose 9
+rjump layer_368
+
+.layer layer_368
+releaserate 100
+legato
+portamento 0x85, 34, 255
+.layer layer_36F
+notedv PITCH_C3, 0x64, 75
+rjump layer_36F
+
+.layer layer_374
+transpose 9
+notepan 74
+rjump layer_37C
+
+.layer layer_37A
+notepan 54
+.layer layer_37C
+env envelope_1006, 255
+legato
+portamento 0x85, 39, 255
+.layer layer_385
+notedv PITCH_G4, 0xC, 40
+.layer layer_388
+notedv PITCH_G2, 0x73, 40
+end
+
+.layer layer_38C
+notepan 94
+call layer_fn_EFC
+rjump layer_395
+
+.layer layer_393
+notepan 84
+.layer layer_395
+call layer_fn_EFC
+notedv PITCH_E4, 0x7E, 100
+notedv PITCH_D4, 0x15F, 78
+call layer_fn_EFC
+notedv PITCH_D4, 0xE2, 95
+notedv PITCH_C4, 0x2D, 86
+notedv PITCH_F4, 0x144, 75
+notedv PITCH_D4, 0xC4, 97
+call layer_fn_EFC
+notedv PITCH_D4, 0xD3, 67
+notedv PITCH_E4, 0x3B, 106
+notedv PITCH_C4, 0x10B, 94
+call layer_fn_EFC
+rjump layer_395
+
+.layer layer_3C4
+notepan 34
+call layer_fn_EFC
+call layer_fn_EFC
+rjump layer_395
+
+.layer layer_3CE
+notepan 44
+.layer layer_3D0
+call layer_fn_EFC
+call layer_fn_EFC
+notedv PITCH_C4, 0x9, 64
+notedv PITCH_C4, 0x96, 75
+call layer_fn_EFC
+notedv PITCH_C4, 0x5F, 100
+notedv PITCH_C4, 0x137, 90
+notedv PITCH_C4, 0xCE, 75
+call layer_fn_EFC
+notedv PITCH_C4, 0x119, 86
+notedv PITCH_C4, 0x23, 69
+notedv PITCH_C4, 0x54, 77
+notedv PITCH_C4, 0x65, 81
+rjump layer_3D0
+
+.layer layer_3FD
+notepan 84
+call layer_fn_F03
+rjump layer_406
+
+.layer layer_404
+notepan 94
+.layer layer_406
+call layer_fn_F03
+notedv PITCH_D4, 0xC, 81
+notedv PITCH_E4, 0xFE, 99
+notedv PITCH_D4, 0x34, 89
+call layer_fn_F03
+notedv PITCH_C4, 0xF4, 86
+notedv PITCH_D4, 0x187, 97
+call layer_fn_F03
+notedv PITCH_C4, 0x15, 72
+notedv PITCH_D4, 0xD3, 67
+notedv PITCH_E4, 0x91, 98
+call layer_fn_F03
+notedv PITCH_E4, 0x8, 86
+notedv PITCH_D4, 0x13B, 94
+notedv PITCH_C4, 0xB, 94
+notedv PITCH_C4, 0x10F, 94
+rjump layer_406
+
+.layer layer_43F
+notepan 44
+call layer_fn_F03
+call layer_fn_F03
+rjump layer_44B
+
+.layer layer_449
+notepan 34
+.layer layer_44B
+call layer_fn_F03
+call layer_fn_F03
+notedv PITCH_C4, 0xD3, 72
+call layer_fn_F03
+notedv PITCH_C4, 0xB, 85
+notedv PITCH_E4, 0x126, 100
+notedv PITCH_D4, 0xA7, 90
+call layer_fn_F03
+notedv PITCH_D4, 0xA6, 75
+notedv PITCH_F4, 0x18, 86
+notedv PITCH_C4, 0x163, 84
+call layer_fn_F03
+notedv PITCH_D4, 0xDB, 94
+notedv PITCH_E4, 0x9, 67
+notedv PITCH_C4, 0xE0, 81
+rjump layer_44B
+
+.layer layer_481
+call layer_fn_F0A
+
+.layer layer_484
+call layer_fn_F0A
+
+.layer layer_487
+call layer_fn_F0A
+
+.layer layer_48A
+call layer_fn_F0A
+notepan 64
+notedvg PITCH_C4, 0x200, 90, 127
+call layer_fn_F0A
+notepan 91
+notedvg PITCH_D4, 0x7F, 61, 127
+ldelay 0x96
+notepan 77
+notedvg PITCH_DF4, 0x1C8, 100, 127
+call layer_fn_F0A
+notepan 38
+notedvg PITCH_C4, 0x174, 54, 127
+ldelay 0xAE
+notepan 87
+notedvg PITCH_DF4, 0x298, 73, 127
+call layer_fn_F0A
+notepan 54
+notedvg PITCH_C4, 0x1B5, 95, 127
+rjump layer_48A
+
+.layer layer_4C7
+notepan 74
+call layer_fn_F11
+call layer_fn_F11
+rjump layer_4D3
+
+.layer layer_4D1
+notepan 94
+.layer layer_4D3
+call layer_fn_F11
+call layer_fn_F11
+notedv PITCH_E4, 0x108, 100
+notedv PITCH_D4, 0xB, 78
+notedv PITCH_D4, 0x2D, 95
+call layer_fn_F11
+notedv PITCH_C4, 0xF6, 86
+notedv PITCH_D4, 0x155, 97
+call layer_fn_F11
+notedv PITCH_D4, 0xD3, 67
+notedv PITCH_C4, 0x15, 94
+notedv PITCH_E4, 0x91, 106
+call layer_fn_F11
+notedv PITCH_D4, 0x13B, 94
+notedv PITCH_E4, 0x8, 106
+notedv PITCH_C4, 0x10F, 94
+rjump layer_4D3
+
+.layer layer_50C
+notepan 54
+call layer_fn_F11
+call layer_fn_F11
+rjump layer_518
+
+.layer layer_516
+notepan 34
+.layer layer_518
+call layer_fn_F11
+call layer_fn_F11
+notedv PITCH_C4, 0xFA, 64
+call layer_fn_F11
+notedv PITCH_C4, 0xE, 75
+notedv PITCH_E4, 0x10F, 100
+notedv PITCH_D4, 0x8, 90
+call layer_fn_F11
+notedv PITCH_D4, 0x92, 75
+notedv PITCH_F4, 0x43, 86
+notedv PITCH_C4, 0x155, 69
+call layer_fn_F11
+notedv PITCH_D4, 0xF5, 77
+notedv PITCH_E4, 0xBD, 77
+notedv PITCH_C4, 0xDA, 81
+rjump layer_518
+
+.layer layer_54E
+call layer_fn_F18
+notepan 84
+notedv PITCH_E4, 0x126, 100
+notepan 74
+notedv PITCH_E4, 0x9, 78
+notedv PITCH_C4, 0x16F, 74
+
+.layer layer_560
+call layer_fn_F18
+call layer_fn_F18
+notepan 47
+notedv PITCH_C4, 0x1C2, 100
+notepan 58
+notedv PITCH_D4, 0xF8, 91
+
+.layer layer_572
+call layer_fn_F18
+ldelay 0x14
+call layer_fn_F18
+notepan 95
+notedv PITCH_F4, 0x4B, 67
+notepan 87
+notedv PITCH_D4, 0x9, 55
+notedv PITCH_D4, 0x18, 60
+notepan 91
+notedv PITCH_E4, 0x126, 100
+
+.layer layer_58D
+call layer_fn_F18
+call layer_fn_F18
+ldelay 0x30
+call layer_fn_F18
+notepan 72
+notedv PITCH_C4, 0xA, 91
+notedv PITCH_DF4, 0xC2, 88
+notepan 37
+notedv PITCH_D4, 0x9, 76
+notedv PITCH_D4, 0x155, 91
+rjump layer_54E
+
+.layer layer_5AC
+call layer_fn_F1F
+call layer_fn_F1F
+
+.layer layer_5B2
+call layer_fn_F1F
+notepan 84
+call layer_fn_F1F
+notedv PITCH_D4, 0xC2, 90
+notedv PITCH_EF4, 0x68, 94
+call layer_fn_F1F
+notedv PITCH_D4, 0x95, 100
+notedv PITCH_E4, 0x61, 105
+call layer_fn_F1F
+notedv PITCH_D4, 0x126, 78
+call layer_fn_F1F
+notedv PITCH_C4, 0x6, 84
+notedv PITCH_E4, 0x24, 76
+notedv PITCH_C4, 0x19D, 78
+notedv PITCH_C4, 0x5E, 57
+notepan 74
+call layer_fn_F1F
+notedv PITCH_D4, 0xA8, 88
+notedv PITCH_C4, 0x159, 67
+notedv PITCH_E4, 0x105, 84
+notedv PITCH_E4, 0x43, 67
+call layer_fn_F1F
+notedv PITCH_DF4, 0xD3, 81
+call layer_fn_F1F
+notedv PITCH_D4, 0xB, 91
+notedv PITCH_E4, 0x126, 88
+rjump layer_5B2
+
+.layer layer_609
+call layer_fn_F1F
+call layer_fn_F1F
+call layer_fn_F1F
+
+.layer layer_612
+call layer_fn_F1F
+notepan 44
+notedv PITCH_D4, 0x15, 75
+notedv PITCH_EF4, 0x3D, 94
+call layer_fn_F1F
+notedv PITCH_D4, 0x95, 81
+notedv PITCH_E4, 0x137, 42
+notedv PITCH_C4, 0x1F4, 69
+call layer_fn_F1F
+notedv PITCH_F4, 0xC8, 91
+notedv PITCH_D4, 0x95, 84
+notepan 54
+call layer_fn_F1F
+notedv PITCH_EF4, 0x95, 87
+notedv PITCH_D4, 0x163, 96
+call layer_fn_F1F
+notedv PITCH_EF4, 0xD8, 61
+call layer_fn_F1F
+notedv PITCH_C4, 0x1E0, 81
+noteldv 39, 0x4F, 68
+call layer_fn_F1F
+notedv PITCH_E4, 0x8, 75
+notedv PITCH_EF4, 0x1A5, 94
+call layer_fn_F1F
+rjump layer_612
+
+.layer layer_665
+loop 3
+notepan 104
+notedv PITCH_E4, 0x1CC, 75
+call layer_fn_F26
+notepan 50
+notedv PITCH_C4, 0x167, 87
+
+.layer layer_676
+call layer_fn_F26
+call layer_fn_F26
+notepan 34
+notedv PITCH_D4, 0x167, 94
+call layer_fn_F26
+notepan 64
+notedv PITCH_D4, 0x167, 62
+
+.layer layer_68B
+call layer_fn_F26
+ldelay 0x22
+call layer_fn_F26
+notepan 79
+notedv PITCH_E4, 0x167, 79
+call layer_fn_F26
+notepan 91
+notedv PITCH_F4, 0x167, 62
+call layer_fn_F26
+notepan 54
+notedv PITCH_C4, 0x167, 86
+call layer_fn_F26
+notepan 36
+notedv PITCH_D4, 0x167, 57
+
+.layer layer_6B4
+call layer_fn_F26
+call layer_fn_F26
+ldelay 0x37
+call layer_fn_F26
+loopend
+notepan 64
+notedv PITCH_C4, 0x9, 57
+notedv PITCH_E4, 0xD8, 69
+call layer_fn_F26
+rjump layer_665
+
+.layer layer_6CE
+call layer_fn_F2D
+notepan 74
+notedv PITCH_E4, 0x15F, 86
+call layer_fn_F2D
+notedv PITCH_E4, 0x126, 59
+notepan 90
+notedv PITCH_E4, 0x15F, 66
+notedv PITCH_C4, 0x126, 49
+
+.layer layer_6E8
+call layer_fn_F2D
+ldelay 0x47
+call layer_fn_F2D
+notedv PITCH_D4, 0x137, 81
+notepan 83
+notedv PITCH_E4, 0x10B, 99
+
+.layer layer_6FA
+call layer_fn_F2D
+call layer_fn_F2D
+ldelay 0x21
+call layer_fn_F2D
+notedv PITCH_C4, 0x18D, 49
+notedv PITCH_C4, 0x116, 78
+notepan 69
+call layer_fn_F2D
+notedv PITCH_C4, 0x1C4, 57
+
+.layer layer_716
+call layer_fn_F2D
+call layer_fn_F2D
+call layer_fn_F2D
+call layer_fn_F2D
+notedv PITCH_C4, 0x149, 92
+notepan 78
+notedv PITCH_C4, 0x108, 75
+call layer_fn_F2D
+rjump layer_6CE
+
+.layer layer_731
+call layer_fn_F34
+
+.layer layer_734
+notepan 54
+call layer_fn_F34
+notepan 49
+notedv PITCH_E4, 0xBF, 86
+notepan 41
+notedv PITCH_D4, 0x44, 59
+notedv PITCH_C4, 0x1CA, 91
+notepan 57
+notedv PITCH_C4, 0xEE, 77
+
+.layer layer_74E
+call layer_fn_F34
+call layer_fn_F34
+ldelay 0x19
+notepan 39
+notedv PITCH_E4, 0xC2, 59
+notedv PITCH_D4, 0xA4, 49
+notepan 51
+notedv PITCH_D4, 0x13F, 55
+notepan 59
+notedv PITCH_C4, 0xDB, 72
+notedv PITCH_C4, 0x2F9, 86
+
+.layer layer_770
+call layer_fn_F34
+call layer_fn_F34
+call layer_fn_F34
+ldelay 0x4B
+notepan 48
+notedv PITCH_D4, 0x34, 95
+notepan 53
+notedv PITCH_C4, 0xED, 64
+call layer_fn_F34
+rjump layer_734
+
+.layer layer_78B
+call layer_fn_F3B
+notedv PITCH_C4, 0x4F, 95
+notedv PITCH_C4, 0x4F, 95
+
+.layer layer_794
+call layer_fn_F3B
+call layer_fn_F3B
+notedv PITCH_C4, 0xA9, 75
+notedv PITCH_C4, 0x63, 73
+notedv PITCH_C4, 0x91, 71
+call layer_fn_F3B
+notedv PITCH_C4, 0x55, 78
+notedv PITCH_C4, 0xD3, 74
+call layer_fn_F3B
+
+.layer layer_7B2
+call layer_fn_F3B
+ldelay 0x29
+call layer_fn_F3B
+notedv PITCH_C4, 0x45, 57
+notedv PITCH_C4, 0x5E, 57
+call layer_fn_F3B
+notedv PITCH_C4, 0x4B, 49
+notedv PITCH_C4, 0x48, 46
+
+.layer layer_7C9
+call layer_fn_F3B
+ldelay 0x44
+call layer_fn_F3B
+call layer_fn_F3B
+notedv PITCH_C4, 0x54, 88
+notedv PITCH_C4, 0x5B, 88
+notedv PITCH_C4, 0xBF, 83
+rjump layer_78B
+
+.layer layer_7E0
+call layer_fn_F42
+call layer_fn_F42
+
+.layer layer_7E6
+call layer_fn_F42
+notepan 24
+notedvg PITCH_E4, 0x1AA, 86, 127
+notedvg PITCH_D4, 0x73, 56, 127
+call layer_fn_F42
+notepan 49
+notedvg PITCH_C4, 0x1F4, 94, 127
+call layer_fn_F42
+notedvg PITCH_E4, 0x349, 68, 127
+notedvg PITCH_F4, 0x167, 71, 127
+call layer_fn_F42
+notedvg PITCH_E4, 0x349, 68, 127
+notedvg PITCH_E4, 0x229, 91, 127
+notedvg PITCH_F4, 0xDB, 71, 127
+call layer_fn_F42
+notedvg PITCH_F4, 0x12C, 82, 220
+call layer_fn_F42
+notedvg PITCH_E4, 0x282, 81, 127
+notedvg PITCH_E4, 0x4F, 68, 127
+notedvg PITCH_F4, 0xDB, 71, 127
+call layer_fn_F42
+notedvg PITCH_F4, 0x1C3, 54, 127
+call layer_fn_F42
+rjump layer_7E6
+
+.layer layer_843
+call layer_fn_F42
+call layer_fn_F42
+
+.layer layer_849
+call layer_fn_F42
+call layer_fn_F42
+notepan 76
+call layer_fn_F42
+notedvg PITCH_E4, 0x142, 86, 127
+call layer_fn_F42
+notedvg PITCH_D4, 0x1F4, 94, 127
+call layer_fn_F42
+notedvg PITCH_E4, 0xFE, 49, 127
+notedvg PITCH_C4, 0xC3, 71, 127
+notedvg PITCH_D4, 0x1CB, 61, 127
+call layer_fn_F42
+notedvg PITCH_D4, 0x25, 51, 127
+call layer_fn_F42
+notedvg PITCH_DF4, 0x23D, 91, 127
+notedvg PITCH_C4, 0x2FD, 88, 127
+notepan 100
+call layer_fn_F42
+notedvg PITCH_E4, 0x15C, 76, 127
+notedvg PITCH_F4, 0x284, 59, 180
+rjump layer_849
+
+.layer layer_898
+notepan 84
+call layer_fn_EFC
+call layer_fn_EFC
+rjump layer_8A4
+
+.layer layer_8A2
+notepan 60
+.layer layer_8A4
+call layer_fn_EFC
+notedv PITCH_C3, 0x34, 89
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 77
+notedv PITCH_C3, 0x34, 77
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 71
+notedv PITCH_C3, 0x34, 71
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 76
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 89
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 64
+notedv PITCH_C3, 0x34, 66
+notedv PITCH_C3, 0x34, 69
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 75
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 85
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 79
+notedv PITCH_C3, 0x34, 77
+notedv PITCH_C3, 0x34, 71
+call layer_fn_F6C
+call layer_fn_F6C
+rjump layer_8A4
+
+.layer layer_924
+notepan 42
+call layer_fn_EFC
+call layer_fn_EFC
+call layer_fn_EFC
+jump layer_934
+
+.layer layer_932
+notepan 69
+.layer layer_934
+call layer_fn_EFC
+notedv PITCH_C3, 0x30, 45
+notedv PITCH_C3, 0x32, 48
+notedv PITCH_C3, 0x34, 47
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 80
+notedv PITCH_C3, 0x34, 81
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x32, 88
+notedv PITCH_C3, 0x34, 84
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x32, 94
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x32, 76
+call layer_fn_F6C
+notedv PITCH_C3, 0x32, 55
+call layer_fn_F6C
+notedv PITCH_C3, 0x32, 65
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x36, 83
+notedv PITCH_C3, 0x34, 87
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x36, 91
+notedv PITCH_C3, 0x34, 85
+call layer_fn_F6C
+call layer_fn_F6C
+call layer_fn_F6C
+notedv PITCH_C3, 0x34, 65
+notedv PITCH_C3, 0x30, 59
+call layer_fn_F6C
+jump layer_934
+
+.layer layer_9B8
+notepan 40
+call layer_fn_F57
+call layer_fn_F57
+rjump layer_A11
+
+.layer layer_9C2
+notepan 50
+.layer layer_9C4
+call layer_fn_F57
+notedv PITCH_C4, 0x41, 86
+ldelay 0x9F
+call layer_fn_F57
+notedv PITCH_DF4, 0x36, 56
+ldelay 0x123
+call layer_fn_F57
+notedv PITCH_C4, 0x45, 36
+ldelay 0x95
+call layer_fn_F57
+notedv PITCH_D4, 0x32, 70
+ldelay 0xE2
+call layer_fn_F57
+notedv PITCH_C4, 0x4C, 51
+ldelay 0x8F
+notedv PITCH_D4, 0x3D, 70
+ldelay 0x14E
+call layer_fn_F57
+rjump layer_9C4
+
+.layer layer_9FC
+notepan 88
+call layer_fn_F57
+call layer_fn_F57
+call layer_fn_F57
+rjump layer_A11
+
+.layer layer_A09
+call layer_fn_F57
+notepan 78
+ldelay 0xD3
+.layer layer_A11
+call layer_fn_F57
+ldelay 0x1BB
+call layer_fn_F57
+ldelay 0x108
+call layer_fn_F57
+notedv PITCH_C4, 0x47, 44
+ldelay 0x1A3
+call layer_fn_F57
+notedv PITCH_C4, 0x47, 64
+call layer_fn_F57
+notedv PITCH_DF4, 0x38, 71
+ldelay 0x15F
+call layer_fn_F57
+notedv PITCH_D4, 0x3C, 89
+ldelay 0x2C1
+call layer_fn_F57
+notedv PITCH_C4, 0x39, 57
+ldelay 0x160
+call layer_fn_F57
+rjump layer_A11
+
+.layer layer_A4C
+notepan 78
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+rjump layer_AAA
+
+.layer layer_A59
+notepan 70
+call layer_fn_F5E
+ldelay 0x38
+rjump layer_AAA
+
+.layer layer_A62
+notepan 40
+call layer_fn_F5E
+call layer_fn_F5E
+rjump layer_A6E
+
+.layer layer_A6C
+notepan 50
+.layer layer_A6E
+call layer_fn_F57
+notedv PITCH_E3, 0x61, 75
+notedv PITCH_E3, 0x5E, 79
+notedv PITCH_E3, 0x5F, 77
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+notedv PITCH_F3, 0x69, 78
+notedv PITCH_F3, 0x70, 79
+notedv PITCH_F3, 0x6B, 72
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+notedv PITCH_E3, 0x5F, 69
+notedv PITCH_E3, 0x59, 74
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+.layer layer_AAA
+notedv PITCH_E3, 0x58, 81
+notedv PITCH_E3, 0x5D, 83
+notedv PITCH_E3, 0x5B, 77
+call layer_fn_F5E
+call layer_fn_F5E
+notedv PITCH_E3, 0x66, 69
+notedv PITCH_E3, 0x64, 74
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+notedv PITCH_F3, 0x66, 74
+call layer_fn_F5E
+call layer_fn_F5E
+call layer_fn_F5E
+notedv PITCH_E3, 0x4E, 87
+notedv PITCH_E3, 0x51, 78
+call layer_fn_F5E
+call layer_fn_F5E
+rjump layer_A6E
+
+.layer layer_AE5
+end
+
+.layer layer_AE6
+call layer_fn_F73
+notedv PITCH_C4, 0xA6, 75
+call layer_fn_F73
+call layer_fn_F73
+call layer_fn_F73
+notedv PITCH_DF4, 0xA6, 79
+
+.layer layer_AFA
+call layer_fn_F73
+call layer_fn_F73
+call layer_fn_F73
+call layer_fn_F73
+notedv PITCH_DF4, 0xA6, 84
+call layer_fn_F73
+call layer_fn_F73
+call layer_fn_F73
+notedv PITCH_C4, 0xA6, 102
+call layer_fn_F73
+call layer_fn_F73
+call layer_fn_F73
+notedv PITCH_C4, 0xA6, 64
+rjump layer_AE6
+
+.layer layer_B26
+releaserate 236
+legato
+notepan 34
+notedv PITCH_C4, 0x2A, 85
+call layer_fn_F49
+call layer_fn_F49
+call layer_fn_F49
+rjump layer_B3F
+
+.layer layer_B39
+releaserate 236
+call layer_fn_F49
+legato
+.layer layer_B3F
+notepan 95
+portamento 0x85, 38, 255
+notedv PITCH_DF4, 0x34, 76
+notedv PITCH_C4, 0x4F, 76
+call layer_fn_F49
+call layer_fn_F49
+notepan 37
+portamento 0x81, 38, 127
+notedv PITCH_C4, 0xE1, 99
+call layer_fn_F49
+notepan 49
+notedv PITCH_C4, 0x1A, 81
+call layer_fn_F49
+notepan 39
+portamento 0x81, 38, 127
+notedv PITCH_C4, 0x112, 91
+call layer_fn_F49
+notepan 55
+portamento 0x85, 39, 255
+notedv PITCH_DF4, 0x112, 78
+notedv PITCH_DF4, 0x5E, 78
+call layer_fn_F49
+call layer_fn_F49
+notepan 74
+portamento 0x81, 38, 127
+notedv PITCH_C4, 0x16, 105
+call layer_fn_F49
+notepan 46
+portamento 0x81, 38, 127
+notedv PITCH_DF4, 0x24, 94
+call layer_fn_F49
+call layer_fn_F49
+call layer_fn_F49
+notepan 94
+portamento 0x85, 39, 255
+notedv PITCH_DF4, 0x112, 78
+notedv PITCH_DF4, 0x5E, 78
+rjump layer_B3F
+
+.layer layer_BB3
+releaserate 236
+legato
+call layer_fn_F49
+call layer_fn_F49
+call layer_fn_F49
+call layer_fn_F49
+notepan 84
+notedv PITCH_DF4, 0x5E, 64
+rjump layer_BD2
+
+.layer layer_BC9
+releaserate 236
+call layer_fn_F49
+call layer_fn_F49
+legato
+.layer layer_BD2
+notepan 94
+portamento 0x81, 38, 127
+notedv PITCH_C4, 0x74, 100
+call layer_fn_F49
+call layer_fn_F49
+notepan 76
+portamento 0x85, 39, 255
+notedv PITCH_DF4, 0x43, 85
+notedv PITCH_B3, 0xF1, 85
+call layer_fn_F49
+call layer_fn_F49
+call layer_fn_F49
+notepan 57
+notedv PITCH_C4, 0x44, 78
+call layer_fn_F49
+notepan 94
+portamento 0x81, 38, 127
+notedv PITCH_DF4, 0x91, 78
+call layer_fn_F49
+notepan 38
+portamento 0x81, 38, 127
+notedv PITCH_DF4, 0x59, 96
+call layer_fn_F49
+notepan 94
+portamento 0x85, 38, 255
+notedv PITCH_C4, 0xC3, 99
+notedv PITCH_B3, 0x17, 99
+call layer_fn_F49
+call layer_fn_F49
+notepan 64
+notedv PITCH_B3, 0x11, 76
+call layer_fn_F49
+notepan 37
+notedv PITCH_B3, 0x13, 105
+call layer_fn_F49
+notepan 43
+portamento 0x81, 38, 127
+notedv PITCH_C4, 0x112, 91
+call layer_fn_F49
+call layer_fn_F49
+rjump layer_BD2
+
+.layer layer_C4D
+releaserate 236
+notepan 34
+ldelay 0x18
+call layer_fn_F50
+notedv PITCH_C4, 0x2A, 85
+call layer_fn_F50
+rjump layer_C60
+
+.layer layer_C5E
+releaserate 236
+.layer layer_C60
+call layer_fn_F50
+notepan 75
+notedv PITCH_C4, 0x34, 94
+call layer_fn_F50
+notepan 34
+notedv PITCH_C4, 0x9F, 67
+call layer_fn_F50
+call layer_fn_F50
+notepan 72
+notedv PITCH_C4, 0xC5, 79
+call layer_fn_F50
+notepan 41
+notedv PITCH_C4, 0x85, 68
+call layer_fn_F50
+notepan 49
+notedv PITCH_C4, 0xD3, 99
+call layer_fn_F50
+call layer_fn_F50
+notepan 68
+notedv PITCH_C4, 0x3B, 94
+call layer_fn_F50
+call layer_fn_F50
+call layer_fn_F50
+notepan 105
+notedv PITCH_C4, 0xC5, 81
+call layer_fn_F50
+notepan 76
+notedv PITCH_C4, 0x3B, 86
+call layer_fn_F50
+call layer_fn_F50
+rjump layer_C60
+
+.layer layer_CB9
+releaserate 236
+notepan 34
+call layer_fn_F50
+ldelay 0x18
+notedv PITCH_C4, 0x5E, 77
+call layer_fn_F50
+call layer_fn_F50
+rjump layer_CD2
+
+.layer layer_CCD
+releaserate 236
+call layer_fn_F50
+.layer layer_CD2
+call layer_fn_F50
+notepan 75
+notedv PITCH_C4, 0x98, 94
+call layer_fn_F50
+notepan 34
+notedv PITCH_C4, 0xD2, 84
+call layer_fn_F50
+call layer_fn_F50
+notepan 59
+notedv PITCH_C4, 0xA8, 99
+call layer_fn_F50
+notepan 95
+notedv PITCH_C4, 0x25, 74
+call layer_fn_F50
+call layer_fn_F50
+notepan 81
+notedv PITCH_C4, 0x2C, 88
+call layer_fn_F50
+call layer_fn_F50
+notepan 64
+notedv PITCH_C4, 0x4E, 91
+call layer_fn_F50
+notepan 37
+notedv PITCH_C4, 0x9E, 68
+call layer_fn_F50
+notepan 45
+notedv PITCH_C4, 0x73, 78
+call layer_fn_F50
+rjump layer_CD2
+
+.layer layer_D24
+call layer_fn_F65
+
+.layer layer_D27
+call layer_fn_F65
+
+.layer layer_D2A
+notepan 34
+ldelay 0x18
+call layer_fn_F65
+notedv PITCH_C4, 0x2A, 85
+call layer_fn_F65
+rjump layer_D3C
+
+.layer layer_D39
+call layer_fn_F65
+.layer layer_D3C
+notepan 75
+notedv PITCH_C4, 0x34, 94
+call layer_fn_F65
+call layer_fn_F65
+notepan 47
+notedv PITCH_DF4, 0x28, 76
+notedv PITCH_DF4, 0x2A, 77
+call layer_fn_F65
+call layer_fn_F65
+call layer_fn_F65
+call layer_fn_F65
+notepan 61
+notedv PITCH_C4, 0x24, 76
+call layer_fn_F65
+call layer_fn_F65
+call layer_fn_F65
+notepan 37
+notedv PITCH_C4, 0x2B, 65
+notedv PITCH_C4, 0x33, 65
+call layer_fn_F65
+call layer_fn_F65
+call layer_fn_F65
+notepan 87
+notedv PITCH_C4, 0x21, 88
+notedv PITCH_C4, 0x2F, 88
+call layer_fn_F65
+notepan 71
+notedv PITCH_C4, 0x2D, 77
+notedv PITCH_C4, 0x27, 77
+call layer_fn_F65
+call layer_fn_F65
+call layer_fn_F65
+notepan 49
+notedv PITCH_C4, 0x37, 85
+call layer_fn_F65
+call layer_fn_F65
+rjump layer_D3C
+
+.channel chan_DA3
+noshort
+rvrbidx 1
+ldfilter filter_1030
+filter 0
+.channel chan_DAB
+delay1
+ldio 1
+sub 1
+rbeqz chan_DB3
+rjump chan_DAB
+.channel chan_DB3
+vol 80
+volexp 127
+panweight 0
+instr FONT02_INSTR_RAIN
+env envelope_1012
+ldlayer 0, layer_DED
+ldlayer 1, layer_DF9
+ldlayer 2, layer_DFF
+.channel chan_DC7
+delay1
+ldio 4
+rbltz chan_DDF
+and 63
+stseq 0, chan_DDD+1
+ldio 4
+and 63
+ldseq addr_F7A
+stseq 80, @+1
+vol 96
+.channel chan_DDD
+bend 0
+.channel chan_DDF
+ldio 1
+sub 0
+rbeqz chan_DE6
+rjump chan_DC7
+.channel chan_DE6
+releaserate 92
+dellayer 0
+dellayer 1
+dellayer 2
+rjump chan_DAB
+
+.layer layer_DED
+notepan 84
+.layer layer_DEF
+legato
+portamento 1, 34, 100
+.layer layer_DF4
+notedv PITCH_C4, 0x60, 100
+rjump layer_DF4
+
+.layer layer_DF9
+transpose 1
+notepan 44
+rjump layer_DEF
+
+.layer layer_DFF
+stereo 20
+legato
+portamento 1, 34, 100
+.layer layer_E06
+notedv PITCH_BF3, 0x60, 100
+rjump layer_E06
+
+.channel chan_E0B
+noshort
+rvrbidx 1
+ldfilter filter_1030
+filter 0
+.channel chan_E13
+delay1
+ldio 1
+sub 1
+rbeqz chan_E1B
+rjump chan_E13
+.channel chan_E1B
+vol 95
+volexp 127
+panweight 0
+reverb 24
+.channel chan_E23
+ldlayer 0, layer_EAD
+ldlayer 1, layer_EA7
+ldi 1
+stio 7
+.channel chan_E2C
+delay1
+ldio 0
+stio 2
+rbeqz chan_E5C
+ldio 1
+sub 0
+rbeqz chan_E58
+ldio 7
+sub 1
+stio 7
+rbeqz chan_E3E
+rjump chan_E2C
+.channel chan_E3E
+rand 90
+stseq 10, layer_EBC+1
+stseq 10, layer_EBF+1
+rand 40
+stseq 68, layer_EB8+3
+stseq 68, layer_EBF
+stio 6
+ldi 50
+stio 7
+rjump chan_E2C
+.channel chan_E58
+dellayer 0
+dellayer 1
+rjump chan_E13
+.channel chan_E5C
+vol 115
+ldio 5
+bgez chan_E64
+ldi 0
+.channel chan_E64
+and 63
+stio 5
+ldi 63
+subio 5
+sub 208
+stseq 0, chan_E72+1
+rand 16
+.channel chan_E72
+stseq 100, layer_ECF+3
+ldi 63
+subio 5
+ldseq addr_FBA
+ldseq addr_F7A
+stio 4
+stseq 103, chan_E87+1
+rand 2
+stio 3
+.channel chan_E87
+stseq 103, layer_ECF
+rand 30
+stseq 49, layer_ECB+1
+stio 6
+ldlayer 0, layer_EC7
+ldlayer 1, layer_EC5
+.channel chan_E98
+delay1
+ldio 0
+rbeqz chan_E5C
+ldio 1
+sub 0
+rbeqz chan_E58
+testlayer 0
+rbeqz chan_E98
+jump chan_E23
+
+.layer layer_EA7
+transpose -12
+.layer layer_EA9
+stereo 20
+rjump layer_EAD
+
+.layer layer_EAD
+instr FONT02_INSTR_THUNDER_RUMBLE
+env envelope_101E, 97
+.layer layer_EB3
+portamento 0x85, 27, 255
+legato
+.layer layer_EB8
+notedv PITCH_A2, 0x1C2, 110
+.layer layer_EBC
+notedv PITCH_A2, 0x64, 110
+.layer layer_EBF
+ldelay 0x60
+nolegato
+noportamento
+rjump layer_EB3
+
+.layer layer_EC5
+transpose -12
+
+.layer layer_EC7
+instr FONT02_INSTR_THUNDER_PEAL
+releaserate 97
+.layer layer_ECB
+notepan 64
+ldelay 0x1
+.layer layer_ECF
+notedv PITCH_C4, 0xC8, 127
+.layer layer_ED3
+stereo 20
+notedv PITCH_A1, 0x28, 80
+stereo 0
+end
+
+.channel chan_EDB
+ldio 7
+sub 2
+rbeqz chan_EE4
+ldi 0
+rjump chan_EE6
+.channel chan_EE4
+ldi 20
+.channel chan_EE6
+stseq 0, addr_EFB
+stseq 0, layer_DFF+1
+stseq 0, layer_EA9+1
+stseq 0, layer_ED3+1
+stseq 0, layer_362+1
+end
+
+.array addr_EFB
+byte 0x0
+
+.layer layer_fn_EFC
+ldelay 0x64
+.layer layer_EFE
+ldelay 0x7F
+.layer layer_F00
+stereo 0
+end
+
+.layer layer_fn_F03
+ldelay 0x64
+.layer layer_F05
+ldelay 0x7F
+.layer layer_F07
+stereo 0
+end
+
+.layer layer_fn_F0A
+ldelay 0x64
+.layer layer_F0C
+ldelay 0x7F
+.layer layer_F0E
+stereo 0
+end
+
+.layer layer_fn_F11
+ldelay 0x64
+.layer layer_F13
+ldelay 0x7F
+.layer layer_F15
+stereo 0
+end
+
+.layer layer_fn_F18
+ldelay 0x64
+.layer layer_F1A
+ldelay 0x7F
+.layer layer_F1C
+stereo 0
+end
+
+.layer layer_fn_F1F
+ldelay 0x64
+.layer layer_F21
+ldelay 0x7F
+.layer layer_F23
+stereo 0
+end
+
+.layer layer_fn_F26
+ldelay 0x64
+.layer layer_F28
+ldelay 0x7F
+.layer layer_F2A
+stereo 0
+end
+
+.layer layer_fn_F2D
+ldelay 0x64
+.layer layer_F2F
+ldelay 0x7F
+.layer layer_F31
+stereo 0
+end
+
+.layer layer_fn_F34
+ldelay 0x64
+.layer layer_F36
+ldelay 0x7F
+.layer layer_F38
+stereo 0
+end
+
+.layer layer_fn_F3B
+ldelay 0x64
+.layer layer_F3D
+ldelay 0x7F
+.layer layer_F3F
+stereo 0
+end
+
+.layer layer_fn_F42
+ldelay 0x64
+.layer layer_F44
+ldelay 0x7F
+.layer layer_F46
+stereo 0
+end
+
+.layer layer_fn_F49
+ldelay 0x64
+.layer layer_F4B
+ldelay 0x7F
+.layer layer_F4D
+stereo 0
+end
+
+.layer layer_fn_F50
+ldelay 0x64
+.layer layer_F52
+ldelay 0x7F
+.layer layer_F54
+stereo 0
+end
+
+.layer layer_fn_F57
+ldelay 0x64
+.layer layer_F59
+ldelay 0x7F
+.layer layer_F5B
+stereo 0
+end
+
+.layer layer_fn_F5E
+ldelay 0x64
+.layer layer_F60
+ldelay 0x7F
+.layer layer_F62
+stereo 0
+end
+
+.layer layer_fn_F65
+ldelay 0x64
+.layer layer_F67
+ldelay 0x7F
+.layer layer_F69
+stereo 0
+end
+
+.layer layer_fn_F6C
+ldelay 0x64
+.layer layer_F6E
+ldelay 0x7F
+.layer layer_F70
+stereo 0
+end
+
+.layer layer_fn_F73
+ldelay 0x64
+.layer layer_F75
+ldelay 0x7F
+.layer layer_F77
+stereo 0
+end
+
+.array addr_F7A
+byte 0x0
+byte 0x0
+byte 0x1
+byte 0x1
+byte 0x2
+byte 0x2
+byte 0x3
+byte 0x3
+byte 0x4
+byte 0x4
+byte 0x5
+byte 0x5
+byte 0x6
+byte 0x6
+byte 0x7
+byte 0x7
+byte 0x8
+byte 0x8
+byte 0x9
+byte 0x9
+byte 0xA
+byte 0xA
+byte 0xB
+byte 0xB
+byte 0xC
+byte 0xC
+byte 0xD
+byte 0xD
+byte 0xE
+byte 0xE
+byte 0xF
+byte 0xF
+byte 0x10
+byte 0x10
+byte 0x11
+byte 0x11
+byte 0x12
+byte 0x12
+byte 0x13
+byte 0x13
+byte 0x14
+byte 0x14
+byte 0x15
+byte 0x15
+byte 0x16
+byte 0x16
+byte 0x17
+byte 0x17
+byte 0x18
+byte 0x18
+byte 0x19
+byte 0x19
+byte 0x1A
+byte 0x1A
+byte 0x1B
+byte 0x1B
+byte 0x1C
+byte 0x1C
+byte 0x1D
+byte 0x1D
+byte 0x1E
+byte 0x1E
+byte 0x1F
+byte 0x1F
+
+.array addr_FBA
+byte 0x0
+byte 0x0
+byte 0x0
+byte 0x0
+byte 0x1
+byte 0x1
+byte 0x1
+byte 0x1
+byte 0x2
+byte 0x2
+byte 0x2
+byte 0x2
+byte 0x3
+byte 0x3
+byte 0x3
+byte 0x3
+byte 0x4
+byte 0x4
+byte 0x4
+byte 0x4
+byte 0x5
+byte 0x5
+byte 0x5
+byte 0x5
+byte 0x6
+byte 0x6
+byte 0x6
+byte 0x6
+byte 0x7
+byte 0x7
+byte 0x7
+byte 0x7
+byte 0x8
+byte 0x8
+byte 0x8
+byte 0x8
+byte 0x9
+byte 0x9
+byte 0x9
+byte 0x9
+byte 0xA
+byte 0xA
+byte 0xA
+byte 0xA
+byte 0xB
+byte 0xB
+byte 0xB
+byte 0xB
+byte 0xC
+byte 0xC
+byte 0xC
+byte 0xC
+byte 0xD
+byte 0xD
+byte 0xD
+byte 0xD
+byte 0xE
+byte 0xE
+byte 0xE
+byte 0xE
+byte 0xF
+byte 0xF
+byte 0xF
+byte 0xF
+
+.envelope envelope_FFA
+point 270, 32700
+.envelope envelope_FFE
+point 125, 32700
+goto 1
+
+.envelope envelope_1006
+point 25, 32700
+point 310, 5000
+hang
+
+.envelope envelope_1012
+point 2000, 32700
+point 32700, 32700
+hang
+
+.envelope envelope_101E
+point 100, 32700
+point 2000, 10000
+hang
+
+.filter filter_1030
+filter 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/assets/sequences/002_Hyrule_Field_Program.prg.seq b/assets/sequences/002_Hyrule_Field_Program.prg.seq
new file mode 100644
index 00000000000..c7bec074b1b
--- /dev/null
+++ b/assets/sequences/002_Hyrule_Field_Program.prg.seq
@@ -0,0 +1,234 @@
+.desc title "Hyrule Field Program"
+.desc type "program"
+.usefont SOUNDFONT_ORCHESTRA
+
+.sequence sequence_start
+
+# io slot 0 = temp, for communicating with loaded seqs. Initially time of day, with 1 = morning
+# io slot 1 = temp, for seq loading
+# io slot 2 = new external state (input from the game)
+# io slot 3 = current external state (0, 1 or 2)
+# io slot 4 = current internal state (0, 1 or 2, same as slot 3)
+# io slot 5 = last random index
+# io slot 6 = which sequence buffer to load into next (either 0 or 1)
+
+mutebhv 0x20
+mutescale 70
+initchan 0xFFFF
+ldi 0
+stio 3 # set current external state = 0 (moving)
+stio 6 # set buffer index = 0
+ldi 255
+stio 5 # set last random index = -1
+
+# Play intro sequence (either morning version or default)
+ldio 0
+sub 1
+rbeqz morning
+ldi 3 # "Initial Segment From Loading Area"
+call playseq
+rjump state_moving
+.sequence morning
+ldi 49 # "Hyrule Field Morning Theme"
+call playseq
+
+.sequence state_moving
+ldi 0
+stio 4 # set internal state = 0
+ldio 2
+rbltz playrandom_moving # if new state = -1, goto moving
+subio 3
+rbeqz playrandom_moving # if external state is unchanged, goto moving
+ldio 2
+stio 3 # set external state = new state
+sub 1
+rbeqz state_enemy_intro # if new state = 1, goto enemy
+ldio 2
+sub 2
+rbeqz state_still_intro # if new state = 2, goto still
+
+# Play a random sequence from among 4..14, but not the same as last time.
+# (If the same sequence is chosen as last time, choose the one just before it instead.)
+.sequence playrandom_moving
+rand 11
+subio 5
+rbeqz same_moving
+rand 11 # same audio frame, so reads the same random value as before
+rjump play_moving
+.sequence same_moving
+rand 11
+rbeqz iszero_moving
+sub 1
+rjump play_moving
+.sequence iszero_moving
+ldi 11
+sub 1
+.sequence play_moving
+stio 5
+sub 252 # += 4
+call playseq
+rjump state_moving
+
+.sequence state_enemy_intro
+ldi 1
+stio 4 # set internal state = 1
+ldi 255
+stio 5 # set last random index = -1
+ldi 15 # "Enemy Approaches"
+call playseq
+
+.sequence state_enemy
+ldio 2
+rbltz playrandom_enemy # if new state = -1, goto enemy
+subio 3
+rbeqz playrandom_enemy # if external state is unchanged, goto enemy
+ldio 2
+stio 3 # set external state = new state
+rbeqz state_moving # if new state = 0, goto moving
+sub 2
+rbeqz state_still_intro # if new state = 2, goto still
+
+# Play a random sequence from among 16..19, but not the same as last time.
+.sequence playrandom_enemy
+rand 4
+subio 5
+rbeqz same_enemy
+rand 4
+rjump play_enemy
+.sequence same_enemy
+rand 4
+rbeqz iszero_enemy
+sub 1
+rjump play_enemy
+.sequence iszero_enemy
+ldi 4
+sub 1
+.sequence play_enemy
+stio 5
+sub 240 # += 16
+call playseq
+rjump state_enemy
+
+.sequence state_still_intro
+ldi 2
+stio 4 # set internal state = 2
+ldi 255
+stio 5 # set last random index = -1
+ldi 20 # "Standing Still Segment 1"
+call playseq
+
+.sequence state_still
+ldio 2
+rbltz playrandom_still # if new state = -1, goto still
+subio 3
+rbeqz playrandom_still # if external state is unchanged, goto still
+ldio 2
+stio 3
+rbeqz state_moving # if new state = 0, goto moving
+sub 1
+rbeqz state_enemy_intro # if new state = 1, goto enemy
+
+# Play a random sequence from among 21..23, but not the same as last time.
+.sequence playrandom_still
+rand 3
+subio 5
+rbeqz same_still
+rand 3
+rjump play_still
+.sequence same_still
+rand 3
+rbeqz iszero_still
+sub 1
+rjump play_still
+.sequence iszero_still
+ldi 3
+sub 1
+.sequence play_still
+stio 5
+sub 235 # += 21
+call playseq
+rjump state_still
+
+.table loadseq_fns
+entry loadseq1
+entry loadseq2
+
+.table playseq_fns
+entry seqbuf1
+entry seqbuf2
+
+# Play the sequence given by the temp register
+.sequence playseq
+stio 7
+
+# Write 0 to port 0 to tell the top-level sequence script that we load to
+# return 30 ticks early, so we have time to load the next sequence.
+# Sound will continue playing during those 30 ticks.
+ldi 0
+stio 0
+
+# Load the chosen sequence into the free buffer. This may take a few ticks.
+ldio 6
+dyncall loadseq_fns
+
+# Wait for previous sequence to finish playing.
+.sequence playseq_retry
+delay1
+testchan 0
+rbeqz playseq_retry
+testchan 6
+rbeqz playseq_retry
+testchan 9
+rbeqz playseq_retry
+testchan 10
+rbeqz playseq_retry
+testchan 12
+rbeqz playseq_retry
+testchan 14
+rbeqz playseq_retry
+ldio 6
+dyncall playseq_fns
+ldi 1
+subio 6
+stio 6 # set buffer index = 1 - buffer index
+end
+
+# Synchronously load the sequence specified by io slot 7 at .seqbuf1
+.sequence loadseq1
+ldio 7
+stseq 0, loadseq1instr+1
+ldi 255
+stio 1
+.sequence loadseq1instr
+ldseq 1, 2, seqbuf1
+rjump loadseq_loop
+
+# Synchronously load the sequence specified by io slot 7 at .seqbuf2
+.sequence loadseq2
+ldio 7
+stseq 0, loadseq2instr+1
+ldi 255
+stio 1
+.sequence loadseq2instr
+ldseq 1, 2, seqbuf2
+
+# Wait for the sequence to load. This will be signalled by a write to io port 1,
+# as specified by the ldseq call.
+.sequence loadseq_loop
+delay1
+ldio 1
+rbeqz loadseq_done
+rbltz loadseq_loop
+end
+.sequence loadseq_done
+end
+
+.buffer seqbuf1
+space 4600
+
+# The alignment of this buffer is off by 8 bytes. In practice this ends up
+# working anyway, as it DMAs 8 bytes into the buffer and the first 8 bytes are
+# interpreted as "testchan 0", which has no effect.
+.balign 8
+.buffer seqbuf2
+space 4600
diff --git a/assets/sequences/109_Cutscene_Effects.prg.seq b/assets/sequences/109_Cutscene_Effects.prg.seq
new file mode 100644
index 00000000000..5e627879a9f
--- /dev/null
+++ b/assets/sequences/109_Cutscene_Effects.prg.seq
@@ -0,0 +1,1147 @@
+.desc title "Cutscene Sounds"
+.desc type "program"
+.usefont SOUNDFONT_SFX_2
+.usefont SOUNDFONT_SFX_1
+
+.sequence sequence_start
+mutebhv 0x60
+mutescale 0
+vol 127
+tempo 120
+initchan 0x1
+ldchan 0, chan_13
+.sequence seq_E
+delay1
+testchan 0
+rbeqz seq_E
+end
+
+.channel chan_13
+noshort
+mutebhv 0x20
+effects 128
+notepri 14
+rvrbidx 1
+font SOUNDFONT_SFX_1
+reverb 15
+panweight 127
+dyntbl table_646
+ldio 0
+rbltz chan_2D
+dyncall
+.channel chan_29
+delay1
+testlayer 0
+rbeqz chan_29
+.channel chan_2D
+end
+
+.channel sword_glow
+reverb 30
+panweight 118
+ldlayer 0, layer_45
+ldlayer 1, layer_58
+ldlayer 2, layer_71
+cdelay 1
+vibdepthgrad 60, 0, 18
+vibfreqgrad 240, 20, 18
+end
+
+.layer layer_45
+notepan 127
+instr FONT00_INSTR_WARP
+transpose 24
+env envelope_78A, 230
+notedv PITCH_A4, 0x10E, 80
+notedv PITCH_A5, 0x12C, 80
+end
+
+.layer layer_58
+notepan 0
+ldelay 0x1
+instr FONT00_INSTR_WATER_FLOWING
+transpose 48
+env envelope_78A, 180
+portamento 0x81, 56, 255
+notedv PITCH_F5, 0xFA, 72
+notedv PITCH_A5, 0x140, 72
+end
+
+.layer layer_71
+ldelay 1
+instr FONT00_INSTR_SHIMMER
+env envelope_78A, 230
+# The last argument here is represented with a single byte, even though the format
+# should use two bytes instead.
+portamentofix 0x1, 15, 133
+noportamento
+notedv PITCH_C5, 0x23A, 64
+end
+
+.channel sheik_transform
+ldlayer 0, layer_99
+ldlayer 1, layer_A6
+ldlayer 2, layer_B7
+cdelay 1
+vibfreqgrad 127, 255, 40
+vibdepthgrad 20, 127, 40
+cdelay 1
+vibdepth 0
+end
+
+.layer layer_99
+instr FONT00_INSTR_WARP
+env envelope_8D2, 221
+transpose 24
+notedv PITCH_C5, 0x190, 105
+end
+
+.layer layer_A6
+ldelay 0x1
+instr FONT00_INSTR_FAIRY_MAGIC
+env envelope_90A, 224
+portamento 0x81, 3, 255
+notedv PITCH_E3, 0x12C, 65
+end
+
+.layer layer_B7
+instr FONT00_INSTR_SYNTH
+portamento 0x81, 24, 25
+notedv PITCH_D3, 0x46, 85
+ldelay 0xC8
+env envelope_916, 221
+portamento 0x81, 27, 25
+notedv PITCH_F3, 0x96, 85
+end
+
+.channel sage_seal
+ldlayer 0, layer_F7
+ldlayer 1, layer_DE
+ldlayer 2, layer_EF
+vibfreq 255
+vibdepth 40
+end
+
+.layer layer_DE
+transpose 48
+instr FONT00_INSTR_EYE_OF_TRUTH
+releaserate 221
+portamento 0x84, 22, 127
+notedv PITCH_A4, 0x60, 85
+notedv PITCH_B4, 0x7F, 95
+end
+
+.layer layer_EF
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_72A, 221
+rjump layer_FD
+
+.layer layer_F7
+instr FONT00_INSTR_SLIDE_LINK
+transpose 36
+releaserate 221
+.layer layer_FD
+portamento 0x85, 46, 255
+notedv PITCH_A2, 0x3C, 90
+env envelope_712, 221
+notedv PITCH_A3, 0x24, 90
+portamento 0x85, 51, 255
+notedv PITCH_C3, 0x7F, 90
+end
+
+.channel nayru_magic
+ldlayer 0, layer_127
+ldlayer 1, layer_11A
+end
+
+.layer layer_11A
+transpose 36
+instr FONT00_INSTR_SHIMMER
+env envelope_87A, 180
+notedv PITCH_E4, 0x226, 70
+end
+
+.layer layer_127
+transpose 30
+instr FONT00_INSTR_WARP
+env envelope_87A, 221
+notedv PITCH_F3, 0x9B, 100
+notedv PITCH_F4, 0x7F, 100
+transpose 36
+instr FONT00_INSTR_WARP
+env envelope_88A, 221
+notedv PITCH_C4, 0xF8, 100
+end
+
+.channel farore_magic
+ldlayer 0, layer_14D
+ldlayer 1, layer_127
+ldlayer 2, layer_11A
+end
+
+.layer layer_14D
+ldelay 0x190
+end
+
+.channel din_magic
+reverb 30
+ldlayer 1, layer_172
+
+.channel lava_erupt
+instr FONT00_INSTR_DISTORTION
+ldlayer 0, layer_165
+ldlayer 2, layer_182
+vibfreq 160
+vibdepthgrad 0, 48, 9
+end
+
+.layer layer_165
+env envelope_78A, 231
+portamento 0x81, 38, 255
+notedv PITCH_F3, 0x24E, 75
+end
+
+.layer layer_172
+ldelay 0x15E
+env envelope_792, 231
+portamento 0x81, 3, 255
+notedv PITCH_C3, 0xF0, 100
+end
+
+.layer layer_182
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_792, 231
+notedv PITCH_AF3, 0x208, 92
+end
+
+.channel bongo_hurl_link
+ldchan 1, chan_251
+ldlayer 0, layer_1D4
+ldlayer 1, layer_1E9
+ldlayer 2, layer_243
+pan 58
+delay 0x30
+transpose 1
+ldlayer 0, layer_1D4
+ldlayer 1, layer_1E9
+ldlayer 2, layer_24A
+pan 70
+delay 0x47
+transpose 2
+ldlayer 0, layer_1D4
+ldlayer 1, layer_1E9
+ldlayer 2, layer_1FA
+pan 64
+delay 0x8E
+transpose 0
+ldlayer 0, layer_201
+ldlayer 1, layer_210
+ldlayer 2, layer_21B
+ldlayer 3, layer_236
+gain 25
+delay 0x64
+gain 0
+delay 0x1E0
+end
+
+.layer layer_1D4
+instr FONT00_INSTR_SWORD_SWING
+env envelope_75E, 251
+portamento 0x81, 55, 127
+notedv PITCH_DF1, 0x8, 115
+portamento 0x81, 6, 255
+notedv PITCH_AF3, 0xB, 105
+end
+
+.layer layer_1E9
+instr FONT00_INSTR_WHISTLE_AIR
+portamento 0x81, 49, 222
+notedv PITCH_BF2, 0x8, 115
+portamento 0x81, 19, 255
+notedv PITCH_F3, 0xC, 115
+end
+
+.layer layer_1FA
+instr FONTANY_INSTR_SFX
+notedvg FONT00_EFFECT_LINK_ADULT_FALL_0, 0x0, 100, 0
+end
+
+.layer layer_201
+instr FONT00_INSTR_SLAM_GUNSHOT
+env envelope_746, 250
+portamento 0x81, 38, 200
+notedvg PITCH_BF3, 0x24, 115, 100
+end
+
+.layer layer_210
+instr FONT00_INSTR_STEP_CARPET_0
+notedv PITCH_E4, 0xA, 75
+notedv PITCH_G3, 0xA, 75
+ldelay 0x7
+end
+
+.layer layer_21B
+ldelay 0x7
+instr FONT00_INSTR_SWORD_HIT_SHIELD
+env envelope_6F6, 250
+notedvg PITCH_C5, 0x6, 39, 127
+instr FONT00_INSTR_SWORD_STRIKE
+notedvg PITCH_D4, 0x4, 49, 127
+instr FONT00_INSTR_STEP_FIRE
+notedv PITCH_B3, 0x5, 39
+notedv PITCH_F3, 0x5, 39
+end
+
+.layer layer_236
+instr FONTANY_INSTR_SFX
+notedvg FONT00_EFFECT_LINK_ADULT_HURT_4, 0x0, 95, 0
+ldelay 0x14
+notedvg FONT00_EFFECT_LINK_ADULT_HURT_4, 0xF, 90, 0
+end
+
+.layer layer_243
+instr FONTANY_INSTR_SFX
+notedvg FONT00_EFFECT_LINK_ADULT_HURT_1, 0x0, 100, 0
+end
+
+.layer layer_24A
+instr FONTANY_INSTR_SFX
+notedvg FONT00_EFFECT_LINK_ADULT_HURT_3, 0x0, 110, 0
+end
+
+.channel chan_251
+noshort
+mutebhv 0x20
+effects 128
+notepri 14
+rvrbidx 1
+reverb 15
+font SOUNDFONT_SFX_2
+ldlayer 0, layer_2AE
+ldlayer 2, layer_2C3
+vibfreq 96
+vibdepth 84
+delay 0x17C
+cdelay 10
+pan 60
+cdelay 10
+pan 56
+cdelay 10
+pan 52
+cdelay 10
+pan 48
+cdelay 10
+pan 52
+cdelay 10
+pan 56
+cdelay 10
+pan 60
+cdelay 10
+pan 64
+cdelay 10
+pan 68
+cdelay 10
+pan 72
+cdelay 10
+pan 76
+cdelay 10
+pan 80
+cdelay 10
+pan 86
+cdelay 10
+pan 94
+cdelay 10
+pan 104
+cdelay 10
+pan 116
+cdelay 10
+pan 127
+cdelay 10
+pan 124
+cdelay 10
+pan 120
+cdelay 10
+pan 116
+cdelay 10
+pan 112
+delay 0x118
+end
+
+.layer layer_2AE
+transpose -4
+instr FONT01_INSTR_DINO_INHALE
+env envelope_8C2, 251
+.layer layer_2B6
+legato
+portamento 0x85, 24, 255
+.layer layer_2BB
+notedv PITCH_A3, 0x64, 90
+notedv PITCH_A2, 0x64, 90
+rjump layer_2BB
+
+.layer layer_2C3
+transpose 4
+instr FONT01_INSTR_BOULDER
+env envelope_8C2, 251
+.layer layer_2CB
+legato
+portamento 0x85, 48, 255
+.layer layer_2D0
+notedv PITCH_A5, 0x32, 76
+notedv PITCH_A4, 0x32, 76
+rjump layer_2D0
+
+.channel bongo_hover
+ldlayer 0, layer_2E8
+ldlayer 1, layer_2EC
+ldlayer 2, layer_2F6
+font SOUNDFONT_SFX_2
+vibfreq 96
+vibdepth 84
+end
+
+.layer layer_2E8
+ldelay 0x750
+end
+
+.layer layer_2EC
+transpose -4
+instr FONT01_INSTR_DINO_INHALE
+env envelope_8EA, 251
+rjump layer_2B6
+
+.layer layer_2F6
+transpose 4
+instr FONT01_INSTR_BOULDER
+env envelope_8EA, 251
+rjump layer_2CB
+
+.channel bongo_death
+font SOUNDFONT_SFX_2
+ldchan 1, chan_344
+delay 0x102
+ldlayer 0, layer_312
+ldlayer 1, layer_32C
+delay 0x47E
+end
+
+.layer layer_312
+instr FONT01_INSTR_MONSTER_ROAR
+env envelope_916, 221
+notedvg PITCH_GF4, 0x64, 90, 50
+portamento 0x81, 48, 255
+notedv PITCH_C4, 0x64, 90
+portamento 0x81, 50, 100
+notedv PITCH_C2, 0x1F4, 90
+end
+
+.layer layer_32C
+instr FONT01_INSTR_THUNDER_HURT
+releaserate 221
+notedvg PITCH_E4, 0x64, 90, 50
+portamento 0x81, 46, 255
+notedv PITCH_B3, 0x64, 90
+portamento 0x81, 48, 100
+notedv PITCH_B1, 0x1F4, 90
+end
+
+.channel chan_344
+noshort
+mutebhv 0x20
+effects 128
+notepri 14
+rvrbidx 1
+reverb 15
+ldlayer 0, layer_36A
+ldlayer 1, layer_375
+font SOUNDFONT_SFX_2
+vibfreq 96
+vibdepth 84
+transpose -12
+delay 0x102
+transpose 4
+delay 0x47E
+.channel chan_365
+delay1
+testlayer 0
+rbeqz chan_365
+end
+
+.layer layer_36A
+transpose -4
+instr FONT01_INSTR_DINO_INHALE
+env envelope_91E, 200
+jump layer_2B6
+
+.layer layer_375
+transpose 4
+instr FONT01_INSTR_BOULDER
+env envelope_91E, 200
+jump layer_2CB
+
+.channel trial_warp
+reverb 40
+ldlayer 0, layer_38E
+ldlayer 1, layer_38C
+ldlayer 2, layer_39D
+end
+
+.layer layer_38C
+transpose -4
+
+.layer layer_38E
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_78A, 241
+portamento 0x81, 3, 224
+notedv PITCH_B4, 0xC6, 80
+end
+
+.layer layer_39D
+instr FONT00_INSTR_SLIDE_HEAVY
+env envelope_86E, 221
+transpose 12
+portamento 0x81, 2, 255
+notedv PITCH_B5, 0xFA, 85
+end
+
+.channel trial_destroy
+instr FONT00_INSTR_SHIMMER
+reverb 40
+ldlayer 0, layer_3C5
+ldlayer 1, layer_3D7
+ldlayer 2, layer_3DB
+ldlayer 3, layer_3EC
+vibdepthgrad 255, 60, 10
+vibfreq 150
+end
+
+.layer layer_3C5
+instr FONT00_INSTR_POTTERY_ELECTRIC
+env envelope_6CE, 245
+portamento 0x82, 27, 255
+notedv PITCH_C4, 0x96, 80
+ldelay 0x96
+end
+
+.layer layer_3D7
+notedv PITCH_C3, 0x64, 85
+end
+
+.layer layer_3DB
+transpose 24
+instr FONT00_INSTR_SLIDE_BLOCK
+env envelope_78A, 200
+portamento 0x82, 51, 180
+notedv PITCH_B5, 0xB4, 75
+end
+
+.layer layer_3EC
+instr FONT00_INSTR_SYNTH_BUZZ
+portamento 0x81, 34, 208
+notedv PITCH_D3, 0xF0, 105
+end
+
+.layer layer_unused_3F7
+instr FONT00_INSTR_WHOOSH
+portamento 0x81, 10, 44
+notedv PITCH_G2, 0x8C, 75
+end
+
+.channel dispel_barrier
+panweight 48
+vol 78
+reverb 55
+ldchan 1, chan_467
+ldlayer 0, layer_44C
+ldlayer 1, layer_424
+ldlayer 2, layer_445
+ldlayer 3, layer_43B
+vibfreq 20
+vibdepth 70
+delay 0x60
+vibfreqgrad 20, 150, 60
+vibdepth 70
+end
+
+.layer layer_424
+instr FONT00_INSTR_FLAME_THUNDER
+env envelope_78A, 211
+legato
+portamento 0x85, 3, 255
+notedv PITCH_F2, 0x60, 100
+notedv PITCH_F2, 0xC8, 100
+notedv PITCH_F3, 0x12C, 74
+end
+
+.layer layer_43B
+instr FONT00_INSTR_FLUTE
+transpose 24
+notepan 88
+ldelay 0x4
+rjump layer_452
+
+.layer layer_445
+transpose -18
+instr FONT00_INSTR_OCARINA_0
+jump layer_452
+
+.layer layer_44C
+instr FONT00_INSTR_WARP
+transpose 12
+notepan 40
+.layer layer_452
+env envelope_78A, 211
+legato
+portamento 0x85, 15, 255
+notedv PITCH_F3, 0x60, 74
+notedv PITCH_F3, 0xC8, 74
+notedv PITCH_F4, 0x12C, 74
+end
+
+.channel chan_467
+noshort
+mutebhv 0x20
+effects 128
+notepri 14
+rvrbidx 1
+reverb 40
+font SOUNDFONT_SFX_1
+call lava_erupt
+delay 0x60
+call lava_erupt
+ldlayer 1, layer_486
+ldlayer 3, layer_498
+delay 0x3E8
+end
+
+.layer layer_486
+instr FONT00_INSTR_SLIDE_BLOCK
+env envelope_78A, 231
+ldelay 0x96
+portamento 0x81, 27, 255
+notedv PITCH_C5, 0x1B8, 45
+end
+
+.layer layer_498
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_792, 231
+ldelay 0xDC
+portamento 0x81, 15, 255
+notedv PITCH_C3, 0x172, 110
+end
+
+.channel tower_collapse
+ldchan 1, chan_4BC
+vol 105
+ldlayer 0, layer_545
+ldlayer 1, layer_536
+ldlayer 2, layer_571
+ldlayer 3, layer_566
+end
+
+.channel chan_4BC
+noshort
+mutebhv 0x20
+effects 128
+notepri 14
+rvrbidx 1
+reverb 40
+vol 105
+panweight 64
+ldlayer 0, layer_4F5
+ldlayer 1, layer_4DB
+ldlayer 2, layer_514
+ldlayer 3, layer_50E
+delay 0x1388
+end
+
+.layer layer_4DB
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_792, 221
+stereo 20
+notepan 84
+notedv PITCH_F2, 0x91, 72
+.layer layer_4E9
+notedv PITCH_D3, 0x5A, 70
+notedv PITCH_F3, 0xE1, 74
+notedv PITCH_A2, 0x61, 68
+rjump layer_4E9
+
+.layer layer_4F5
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_792, 221
+stereo 20
+notepan 44
+notedv PITCH_D3, 0x10B, 72
+.layer layer_503
+notedv PITCH_C3, 0x5E, 40
+notedv PITCH_D3, 0x7C, 44
+notedv PITCH_B2, 0x30, 68
+rjump layer_503
+
+.layer layer_50E
+transpose -12
+instr FONT00_INSTR_MECH_CHARGE
+rjump layer_51A
+
+.layer layer_514
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_71E, 230
+.layer layer_51A
+ldelay 0xA82
+portamento 0x81, 55, 60
+notedv PITCH_C2, 0xC0, 100
+portamento 0x81, 58, 60
+notedv PITCH_E2, 0xC0, 100
+portamento 0x81, 62, 45
+notedv PITCH_G2, 0x1F4, 100
+end
+
+.layer layer_536
+transpose -6
+call layer_fn_552
+nolegato
+noportamento
+instr FONT00_INSTR_BLOCK_LOCK
+ldelay 0x14
+transpose -3
+rjump layer_589
+
+.layer layer_545
+call layer_fn_552
+nolegato
+noportamento
+instr FONT00_INSTR_MECH_CHARGE
+ldelay 0xA
+transpose 10
+rjump layer_589
+
+.layer layer_fn_552
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_792, 211
+legato
+portamento 0x85, 51, 255
+notedv PITCH_E5, 0xC8, 90
+notedv PITCH_G5, 0x979, 80
+end
+
+.layer layer_566
+transpose 5
+call layer_fn_581
+ldelay 0x14
+instr FONT00_INSTR_MECH_CHARGE
+rjump layer_589
+
+.layer layer_571
+call layer_fn_581
+instr FONT00_INSTR_BLOCK_LOCK
+rjump layer_589
+
+.layer layer_unused_578
+env envelope_792, 200
+legato
+portamento 0x81, 17, 255
+
+.layer layer_fn_581
+instr FONT00_INSTR_DOOR_METAL
+notedv PITCH_A2, 0xA41, 65
+nolegato
+end
+.layer layer_589
+notedv PITCH_E3, 0xC0, 120
+notedv PITCH_G3, 0xC0, 120
+releaserate 160
+notedv PITCH_A3, 0xC0, 120
+end
+
+.channel link_scream
+vol 110
+instr FONTANY_INSTR_SFX
+ldfilter filter_5B0
+filter 64
+reverb 40
+gain 25
+ldlayer 0, layer_5A9
+end
+
+.layer layer_5A9
+notedv FONT00_EFFECT_LINK_CHILD_FALL_1, 0x0, 110
+end
+
+.filter filter_5B0
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.channel rainfall
+instr FONTANY_INSTR_DRUM
+env envelope_90A
+releaserate 200
+panweight 0
+ldlayer 0, layer_5DA
+ldlayer 1, layer_5E0
+ldchan 1, chan_5E6
+delay 0x708
+dellayer 0
+dellayer 1
+delay 0x64
+end
+
+.layer layer_5DA
+legato
+.layer layer_5DB
+notedv FONT00_DRUM_RAIN_1, 0x64, 80
+rjump layer_5DB
+
+.layer layer_5E0
+legato
+.layer layer_5E1
+notedv FONT00_DRUM_RAIN_0, 0x64, 80
+rjump layer_5E1
+
+.channel chan_5E6
+noshort
+mutebhv 0x20
+effects 128
+notepri 14
+rvrbidx 1
+reverb 20
+vol 100
+gain 15
+delay 0x240
+ldlayer 0, layer_633
+ldlayer 1, layer_62F
+ldlayer 2, layer_63F
+vol 75
+delay 0xC8
+ldlayer 0, layer_633
+ldlayer 1, layer_62F
+ldlayer 2, layer_63F
+vol 110
+delay 0x87
+ldlayer 0, layer_633
+ldlayer 1, layer_62F
+ldlayer 2, layer_63F
+vol 95
+delay 0x156
+ldlayer 0, layer_633
+ldlayer 1, layer_62F
+ldlayer 2, layer_63F
+delay 0xFA
+end
+
+.layer layer_62F
+transpose 36
+rjump layer_635
+
+.layer layer_633
+transpose 48
+.layer layer_635
+instr FONT00_INSTR_FLAME_THUNDER
+env envelope_692, 200
+notedv PITCH_G4, 0x0, 110
+end
+
+.layer layer_63F
+instr FONT00_INSTR_POTTERY_ELECTRIC
+notedv PITCH_G3, 0x32, 50
+end
+
+.array unused_645
+byte 0x0
+
+.table table_646
+entry sword_glow # FX0: Master sword glow
+entry sheik_transform # FX1: Sheik's transformation to Zelda
+entry sage_seal # FX2: Sages accumulating their power
+entry nayru_magic # FX3: Nayru's magic establishing order
+entry farore_magic # FX4: Farore's magic creating life
+entry din_magic # FX5: Din's building of the earth
+entry lava_erupt # FX6: Lava erupting from Volvagia's pit
+entry bongo_hurl_link # FX7: Link screaming while attacked by invisible Bongo Bongo
+entry bongo_hover # FX8: Bongo Bongo hovering menacingly
+entry bongo_death # FX9: Bongo Bongo disintegrating
+entry trial_warp # FXA: Warping from trial barrier
+entry trial_destroy # FXB: Destroying the trial barrier
+entry dispel_barrier # FXC: Dispelling the Tower barrier
+entry tower_collapse # FXD: Ganon's Tower's collapse
+entry link_scream # FXE: Child Link screaming (unused)
+entry rainfall # FXF: Rain with thunder effects
+
+.envelope envelope_unused_666
+point 1, 32700
+hang
+
+.envelope envelope_unused_66E
+point 1, 32700
+point 100, 30000
+point 200, 5000
+hang
+
+.envelope envelope_unused_67E
+point 1, 32700
+point 25, 25000
+point 100, 25000
+point 200, 5000
+hang
+
+.envelope envelope_692
+point 1, 32700
+point 100, 30000
+point 250, 30000
+point 200, 5000
+hang
+
+.envelope envelope_unused_6A6
+point 1, 32700
+point 50, 30000
+point 100, 10000
+point 100, 0
+hang
+
+.envelope envelope_unused_6BA
+point 1, 32700
+point 30, 30000
+point 50, 10000
+point 50, 0
+hang
+
+.envelope envelope_6CE
+point 1, 32700
+point 70, 30000
+point 120, 10000
+point 120, 0
+hang
+
+.envelope envelope_unused_6E2
+point 1, 32700
+point 15, 32700
+point 15, 22000
+point 100, 15000
+hang
+
+.envelope envelope_6F6
+point 1, 32700
+point 8, 32700
+point 8, 22000
+point 100, 15000
+hang
+
+.envelope envelope_unused_70A
+point 10, 32700
+hang
+
+.envelope envelope_712
+point 30, 10000
+point 30, 32700
+hang
+
+.envelope envelope_71E
+point 20, 15000
+point 10, 32700
+hang
+
+.envelope envelope_72A
+point 48, 10000
+point 32, 32700
+hang
+
+.envelope envelope_unused_736
+point 47, 15000
+point 13, 32700
+point 72, 10000
+hang
+
+.envelope envelope_746
+point 6, 32700
+hang
+
+.envelope envelope_unused_74E
+point 20, 32700
+point 50, 10000
+point 40, 0
+hang
+
+.envelope envelope_75E
+point 18, 32700
+hang
+
+.envelope envelope_unused_766
+point 10, 32700
+point 240, 31000
+point 150, 2000
+hang
+
+.envelope envelope_unused_776
+point 14, 15000
+point 13, 32700
+hang
+
+.envelope envelope_unused_782
+point 40, 32700
+hang
+
+.envelope envelope_78A
+point 400, 32700
+hang
+
+.envelope envelope_792
+point 100, 32700
+hang
+
+.envelope envelope_unused_79A
+point 225, 32700
+point 30, 30000
+hang
+
+.envelope envelope_unused_7A6
+point 200, 32700
+hang
+
+.envelope envelope_unused_7AE
+point 3, 32700
+hang
+
+.envelope envelope_unused_7B6
+point 12, 32700
+point 40, 5000
+hang
+
+.envelope envelope_unused_7C2
+point 10, 32700
+point 4, 20000
+point 4, 10000
+point 50, 2000
+hang
+
+.envelope envelope_unused_7D6
+point 40, 32700
+point 150, 32700
+point 300, 0
+hang
+
+.envelope envelope_unused_7E6
+point 40, 32700
+point 800, 32700
+point 100, 16000
+point 100, 32700
+point 100, 16000
+point 100, 32700
+point 100, 16000
+point 100, 32700
+point 600, 0
+hang
+
+.envelope envelope_unused_80E
+point 200, 32700
+point 100, 16000
+point 100, 32700
+point 100, 16000
+point 100, 32700
+point 600, 0
+hang
+
+.envelope envelope_unused_82A
+point 35, 32700
+point 40, 32700
+point 105, 0
+hang
+
+.envelope envelope_unused_83A
+point 1, 25000
+point 12, 32700
+point 40, 32700
+point 60, 15000
+point 80, 5000
+hang
+
+.envelope envelope_unused_852
+point 10, 32700
+point 50, 32700
+point 60, 5000
+hang
+
+.envelope envelope_unused_862
+point 200, 32700
+point 340, 0
+hang
+
+.envelope envelope_86E
+point 400, 32700
+point 400, 20000
+goto 0
+
+.envelope envelope_87A
+point 1400, 32700
+point 400, 14000
+point 400, 32700
+goto 1
+
+.envelope envelope_88A
+point 25, 32700
+point 490, 12000
+hang
+
+.envelope envelope_unused_896
+point 100, 32700
+point 450, 32700
+point 150, 32700
+point 1200, 32700
+point 400, 20000
+hang
+
+.envelope envelope_unused_8AE
+point 200, 32700
+point 200, 20000
+goto 0
+
+.envelope envelope_unused_8BA
+point 2, 25000
+hang
+
+.envelope envelope_8C2
+point 1, 32700
+point 712, 32700
+point 900, 0
+hang
+
+.envelope envelope_8D2
+point 1, 32700
+point 200, 32700
+point 200, 16000
+point 200, 32700
+point 600, 0
+hang
+
+.envelope envelope_8EA
+point 140, 20000
+point 2540, 10000
+point 200, 32700
+point 720, 20000
+point 240, 27000
+point 20, 16000
+point 940, 32700
+hang
+
+.envelope envelope_90A
+point 100, 20000
+point 400, 32700
+hang
+
+.envelope envelope_916
+point 50, 32700
+hang
+
+.envelope envelope_91E
+point 500, 25000
+point 675, 30000
+point 800, 25000
+point 20, 20000
+hang
+
+# It's impossible to tell if these were unused filters, envelopes only containing
+# ADSR_DISABLE, or a buffer of size 0x20. Unused filters seems the most likely, so
+# that's how this is represented here.
+.filter unused_filter_940
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter unused_filter_950
+filter 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/assets/sequences/sfxbanks/enemy.seq.inc b/assets/sequences/sfxbanks/enemy.seq.inc
new file mode 100644
index 00000000000..31f5747c825
--- /dev/null
+++ b/assets/sequences/sfxbanks/enemy.seq.inc
@@ -0,0 +1,5964 @@
+.table table_enemy
+entry enemy_dodongo_walk
+entry enemy_dodongo_breathe
+entry enemy_dodongo_flame
+entry enemy_dodongo_hurt
+entry enemy_dodongo_die
+entry enemy_boss_dodongo_exhale
+entry enemy_boss_dodongo_hurt
+entry enemy_boss_dodongo_die
+entry enemy_boss_dodongo_walk
+entry enemy_boss_dodongo_flame
+entry enemy_boss_gohma_walk
+entry enemy_boss_gohma_walk_ceiling
+entry enemy_boss_gohma_climb
+entry enemy_boss_gohma_fall
+entry enemy_boss_gohma_roar
+entry enemy_boss_gohma_growl
+entry enemy_boss_gohma_hurt
+entry enemy_boss_gohma_hurt_eye
+entry enemy_boss_gohma_die
+entry enemy_boss_gohma_birth
+entry enemy_larvae_egg_land
+entry enemy_larvae_egg_break
+entry enemy_larvae_walk
+entry enemy_larvae_chirp
+entry enemy_larvae_hurt
+entry enemy_larvae_cry
+entry enemy_larvae_die
+entry enemy_boss_gohma_eyeroll
+entry enemy_boss_gohma_dissolve
+entry enemy_boss_gohma_thrust
+entry enemy_boss_gohma_paralyzed
+entry enemy_larvae_paralyzed
+entry enemy_dodongo_jr_yell
+entry enemy_dodongo_jr_die
+entry enemy_dodongo_jr_walk
+entry enemy_dodongo_jr_burrow
+entry enemy_dodongo_jr_emerge
+entry enemy_ganondorf_throw_orb
+entry enemy_dodongo_jr_eat
+entry enemy_ganondorf_hit_light
+entry enemy_lizalfos_land
+entry enemy_lizalfos_cry
+entry enemy_lizalfos_attack_shout
+entry enemy_lizalfos_hurt
+entry enemy_lizalfos_laugh
+entry enemy_lizalfos_die
+entry enemy_lizalfos_walk
+entry enemy_lizalfos_jump
+entry enemy_stalkid_walk
+entry enemy_stalkid_attack
+entry enemy_stalkid_hurt
+entry enemy_stalkid_die
+entry enemy_floormaster_slide
+entry enemy_tektite_turn_water
+entry enemy_destroyed_light_arrow
+entry enemy_pot_fly
+entry enemy_stalfos_laugh
+entry enemy_stalfos_attack
+entry enemy_stalfos_hurt
+entry enemy_stalfos_die
+entry enemy_wolfos_spawn
+entry enemy_stalfos_walk
+entry enemy_wolfos_howl
+entry enemy_wolfos_attack
+entry enemy_keese_attack
+entry enemy_keese_fly
+entry enemy_keese_die
+entry enemy_wolfos_hurt
+entry enemy_armos_hop
+entry enemy_armos_awaken
+entry enemy_armos_die
+entry enemy_armos_hurt
+entry enemy_armos_roar
+entry enemy_shell_open
+entry enemy_shell_die
+entry enemy_wolfos_die
+entry enemy_boss_dodongo_demo_wall
+entry enemy_boss_dodongo_wall_hit
+entry enemy_boss_dodongo_roll
+entry enemy_boss_dodongo_inhale
+entry enemy_boss_dodongo_swallow
+entry enemy_boss_dodongo_paralyzed
+entry enemy_boss_dodongo_roar
+entry enemy_boss_dodongo_dying_groan
+entry enemy_boss_dodongo_fossilize
+entry enemy_boss_dodongo_lava
+entry enemy_ganondorf_fly
+entry enemy_ganondorf_vortex_charge
+entry enemy_dodongo_inhale
+entry enemy_dodongo_swipe
+entry enemy_wolfos_walk
+entry enemy_dodongo_jr_eat
+entry enemy_big_baba_chomp
+entry enemy_big_baba_attack
+entry enemy_big_baba_hurt
+entry enemy_big_baba_die
+entry enemy_deku_baba_chomp
+entry enemy_deku_baba_attack
+entry enemy_deku_baba_die
+entry enemy_deku_baba_slide
+entry enemy_tailpasaran_fly
+entry enemy_tailpasaran_cry
+entry enemy_tailpasaran_die
+entry enemy_ganondorf_charge
+entry enemy_skulltula_drop
+entry enemy_skulltula_climb
+entry enemy_skulltula_quiver
+entry enemy_skulltula_hurt
+entry enemy_stalfos_jump
+entry enemy_tektite_hurt
+entry enemy_tektite_die
+entry enemy_tektite_turn_ground
+entry enemy_poe_attack_charge
+entry enemy_poe_float
+entry enemy_poe_retreat
+entry enemy_poe_appear
+entry enemy_poe_vanish
+entry enemy_poe_hurt
+entry enemy_poe_die
+entry enemy_poe_transform
+entry enemy_dissolve
+entry enemy_goron_land
+entry enemy_lizalfos_land_flat
+entry enemy_dodongo_jr_land
+entry enemy_scrub_emerge
+entry enemy_scrub_burrow
+entry enemy_scrub_spit
+entry enemy_scrub_walk
+entry enemy_scrub_hurt
+entry enemy_scrub_die
+entry enemy_shop_scrub_cry
+entry enemy_big_poe_get_soul
+entry enemy_skulltula_pivot
+entry enemy_skullwall_die
+entry enemy_poe_sister_die
+entry enemy_bari_split
+entry enemy_tektite_flip
+entry enemy_boss_gohma_fall
+entry enemy_tektite_land_water1
+entry enemy_final_hit
+entry enemy_skullwall_rotate
+entry enemy_skullwall_dash
+entry enemy_tektite_jump_water
+entry enemy_tektite_land_water2
+entry enemy_wallmaster_fall
+entry enemy_wallmaster_retreat
+entry enemy_wallmaster_grab
+entry enemy_larvae_egg_land
+entry enemy_floormaster_walk
+entry enemy_floormaster_hurt
+entry enemy_floormaster_die
+entry enemy_guay_fly
+entry enemy_biri_float
+entry enemy_biri_fly
+entry enemy_biri_shock
+entry enemy_biri_die
+entry enemy_biri_die_bubbles
+entry enemy_bari_spin
+entry enemy_larvae_paralyzed
+entry enemy_bari_die
+entry enemy_ganondorf_orb_trail
+entry enemy_phantom_reveal
+entry enemy_phantom_lightning
+entry enemy_ganondorf_charge
+entry enemy_ganondorf_fly
+entry enemy_witch_charge
+entry enemy_phantom_painting_enter
+entry enemy_ganondorf_orb_trail
+entry enemy_ganondorf_lightning_hit
+entry enemy_phantom_attack_unused
+entry enemy_phantom_staff
+entry enemy_phantom_eyes
+entry enemy_phantom_die_roar
+entry enemy_phantom_orb_dissipate
+entry enemy_phantom_hurt
+entry enemy_phantom_die
+entry enemy_phantom_laugh
+entry enemy_phantom_hurt_orb
+entry enemy_phantom_shout
+entry enemy_guay_hurt
+entry enemy_ganondorf_charge_major
+entry enemy_ganondorf_magic_fire
+entry enemy_guay_chirp
+entry enemy_guay_attack
+entry enemy_moblin_walk
+entry enemy_moblin_slide
+entry enemy_moblin_attack_shout
+entry enemy_moblin_grunt
+entry enemy_moblin_spear_point
+entry enemy_moblin_spear_relax
+entry enemy_moblin_die
+entry enemy_moblin_dash
+entry enemy_octorok_rock_break
+entry enemy_octorok_float
+entry enemy_octorok_jump
+entry enemy_tektite_land_water1
+entry enemy_octorok_dive
+entry enemy_octorok_bubble
+entry enemy_octorok_die
+entry enemy_octorok_death_gasp
+entry enemy_keese_fly
+entry enemy_bubble_dash
+entry enemy_bubble_cry
+entry enemy_bubble_attack
+entry enemy_bubble_flame_appear
+entry enemy_bubble_flame_vanish
+entry enemy_bubble_die
+entry enemy_dodongo_flame
+entry enemy_boss_volvagia_hole
+entry enemy_boss_volvagia_roar
+entry enemy_boss_gohma_hurt_eye
+entry enemy_volvagia_fall
+entry enemy_volvagia_paralyzed
+entry enemy_boss_gohma_hurt
+entry enemy_boss_volvagia_cry
+entry enemy_boss_volvagia_rock
+entry enemy_boss_volvagia_swipe
+entry enemy_boss_gohma_die
+entry enemy_boss_dodongo_fossilize
+entry enemy_boss_dodongo_flame
+entry enemy_biri_die
+entry enemy_dodongo_jr_land
+entry enemy_boss_morpha_water_move
+entry enemy_tektite_turn_water
+entry enemy_moblin_club_shockwave
+entry enemy_moblin_club_strike
+entry enemy_moblin_club_lift
+entry enemy_bubble_hurt
+entry enemy_redead_moan
+entry enemy_redead_scream
+entry enemy_redead_hurt
+entry enemy_redead_die
+entry enemy_redead_attack
+entry enemy_spike_trap_roll
+entry enemy_spike_trap_rock
+entry enemy_guay_die
+entry enemy_poe_laugh
+entry enemy_poe_sister_cry
+entry enemy_poe_sister_attack
+entry enemy_poe_sister_laugh
+entry enemy_boss_morpha_rise
+entry enemy_boss_morpha_attack
+entry enemy_boss_morpha_toss
+entry enemy_boss_morpha_grab
+entry enemy_boss_morpha_caught
+entry enemy_boss_morpha_demo_move
+entry enemy_boss_morpha_demo_bubble
+entry enemy_tektite_jump_water
+entry enemy_boss_morpha_die
+entry enemy_boss_morpha_die_cry
+entry enemy_boss_morpha_water_spin
+entry enemy_witch_charge
+entry enemy_goron_wake
+entry enemy_goron_sit
+entry enemy_unused
+entry enemy_cucco_flap
+entry enemy_deadhand_bite
+entry enemy_deadhand_move
+entry enemy_deadhand_grabbed
+entry enemy_deadhand_grab
+entry enemy_big_octo_paralyzed
+entry enemy_big_octo_walk
+entry enemy_big_octo_grunt
+entry enemy_big_octo_hurt
+entry enemy_big_octo_stop
+entry enemy_big_octo_die
+entry enemy_big_octo_die2
+entry enemy_phantom_lightning
+entry enemy_boss_twinrova_appear
+entry enemy_boss_twinrova_transform
+entry enemy_boss_twinrova_fire_charge
+entry enemy_boss_twinrova_fire_hit
+entry enemy_boss_twinrova_charge
+entry enemy_boss_twinrova_ice_beam
+entry enemy_boss_twinrova_ice_charge
+entry enemy_boss_twinrova_cast
+entry enemy_boss_ganondorf_struck
+entry enemy_boss_dodongo_demo_wall
+entry enemy_boss_twinrova_hurt_cry_old
+entry enemy_boss_twinrova_ice_reflected
+entry enemy_boss_twinrova_fire_reflected
+entry enemy_boss_ganondorf_struck
+entry enemy_boss_twinrova_hit_beam_young
+entry enemy_boss_twinrova_die_young
+entry enemy_biggoron_blind
+entry enemy_biggoron_happy
+entry enemy_boss_twinrova_spirit_fly
+entry enemy_boss_twinrova_fly
+entry enemy_boss_twinrova_hover
+entry enemy_poe_sister_attack
+entry enemy_ganondorf_orb_trail
+entry enemy_phantom_painting_enter
+entry enemy_darunia_chest_pound
+entry enemy_darunia_head_pat
+entry enemy_owl_fly
+entry enemy_goron_land
+entry enemy_knuckle_walk
+entry enemy_knuckle_attack
+entry enemy_knuckle_clank
+entry enemy_knuckle_stagger
+entry enemy_knucle_armor_loss
+entry enemy_knuckle_armor_rebound1
+entry enemy_knuckle_armor_rebound2
+entry enemy_knuckle_armor_rebound3
+entry enemy_floormaster_attack
+entry enemy_floormaster_mini_walk
+entry enemy_floormaster_mini_die
+entry enemy_floormaster_mini_grow
+entry enemy_floormaster_grow_done
+entry enemy_floormaster_split
+entry enemy_floormaster_mini_grab
+entry enemy_floormaster_mini_land
+entry enemy_knuckle_warcry
+entry enemy_knuckle_snap
+entry enemy_knuckle_armor_hurt
+entry enemy_boss_ganondorf_struck
+entry enemy_boss_barinade_pulse
+entry enemy_boss_barinade_hurt
+entry enemy_boss_barinade_weak_hurt
+entry enemy_boss_barinade_die
+entry enemy_boss_twinrova_hurt
+entry enemy_boss_barinade_bari_attach
+entry enemy_boss_barinade_beam
+entry enemy_biri_shock
+entry enemy_biri_die
+entry enemy_boss_barinade_tentacle_break
+entry enemy_ganondorf_lightning_hit
+entry enemy_boss_dodongo_roll
+entry enemy_shabom_bounce
+entry enemy_shabom_pop
+entry enemy_blob_wave
+entry enemy_octorok_rock_break
+entry enemy_stinger_hurt
+entry enemy_stinger_die
+entry enemy_stinger_submerge
+entry enemy_stinger_glide
+entry enemy_boss_bongo_drum_low
+entry enemy_boss_bongo_drum_high
+entry enemy_boss_bongo_clap
+entry enemy_deadhand_grab
+entry enemy_peahat_rise
+entry enemy_peahat_fly
+entry enemy_peahat_hurt
+entry enemy_peahat_land
+entry enemy_deadhand_grab
+entry enemy_tentacle_wind_up
+entry enemy_peahat_hurt
+entry enemy_tentacle_die
+entry enemy_larvae_walk
+entry enemy_larvae_chirp
+entry enemy_larvae_hurt
+entry enemy_larvae_cry
+entry enemy_larvae_die
+entry enemy_larvae_egg_land
+entry enemy_larvae_egg_break
+entry enemy_boss_ganon_transform
+entry enemy_boss_bongo_hand_wave
+entry enemy_wallmaster_grab
+entry enemy_goron_land
+entry enemy_boss_bongo_hand_attack
+entry enemy_boss_bongo_hand_shake
+entry enemy_boss_bongo_hurt
+entry enemy_boss_bongo_hand_hurt
+entry enemy_boss_bongo_vanish
+entry enemy_ganondorf_charge_major
+entry enemy_boss_barinade_beam
+entry enemy_boss_bongo_paralyze
+entry enemy_boss_bongo_die
+entry enemy_beamos_idle
+entry enemy_beamos_beam
+entry enemy_beamos_ground_hit
+entry enemy_beamos_charging
+entry enemy_torch_slug_crawl
+entry enemy_torch_slug_target
+entry enemy_tektite_flip
+entry enemy_torch_slug_hurt
+entry enemy_torch_slug_die
+entry enemy_tile_fly
+entry enemy_firedancer_hurt
+entry enemy_boss_twinrova_fly
+entry enemy_firedancer_kick
+entry enemy_moblin_club_shockwave
+entry enemy_firedancer_spin
+entry enemy_firehead_run
+entry enemy_firehead_hurt
+entry enemy_firedancer_laugh
+entry enemy_deku_baba_slide
+entry enemy_boss_volvagia_hole
+entry enemy_peahat_jr_fly
+entry enemy_keese_die
+entry enemy_leever_emerge
+entry enemy_shop_scrub_burrow
+entry enemy_boss_gohma_hurt
+entry enemy_leever_die
+entry enemy_blob_wave
+entry enemy_firehead_cry
+entry enemy_boss_bongo_dissipate
+entry enemy_boss_bongo_charge
+entry enemy_boss_bongo_chant
+entry enemy_boss_ganon_roar
+entry enemy_torch_slug_crawl
+entry enemy_boss_morpha_grab
+entry enemy_boss_dodongo_swallow
+entry enemy_boss_gohma_eyeroll
+entry enemy_scrub_spit
+entry enemy_boss_gohma_hurt
+entry enemy_like_like_die
+entry enemy_boss_ganon_attack
+entry enemy_gerudo_attack
+entry enemy_gerudo_hurt
+entry enemy_gerudo_defeat
+entry enemy_boss_ganon_hurt
+entry enemy_dodongo_flame
+entry enemy_anubis_fire_hit
+entry enemy_boss_ganon_penultimate_hit
+entry enemy_anubis_die
+entry enemy_wolfos_walk
+entry enemy_boss_ganon_die
+entry enemy_stinger_attack
+entry enemy_stinger_cry
+entry enemy_boss_twinrova_ice_beam
+entry enemy_freezard_hurt
+entry enemy_freezard_die
+entry enemy_deadhand_laugh
+entry enemy_deadhand_burrow
+entry enemy_deadhand_hurt
+entry enemy_big_baba_die
+entry enemy_deadhand_die
+entry enemy_knuckle_stump_break
+entry enemy_knuckle_pillar_break
+entry enemy_knuckle_axe_stuck
+entry enemy_boss_ganon_paralyze
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_boss_vocals
+entry enemy_goron_land
+entry enemy_deadhand_burrow
+entry enemy_boss_ganon_growl
+entry enemy_gold_skull_spin
+entry enemy_blob_wave
+entry enemy_armos_hop
+entry enemy_knuckle_stump_break
+entry enemy_armos_hop
+entry enemy_boss_ganon_sword_clank
+entry enemy_deadhand_grab
+entry enemy_skulltula_creak
+entry enemy_floormaster_grow_done
+entry enemy_dodongo_jr_land
+entry enemy_stalfos_walk
+entry enemy_dodongo_jr_land
+entry enemy_stalfos_walk
+entry enemy_boss_twinrova_bicker
+entry enemy_big_poe_caught_soul
+entry enemy_bug_burrow
+entry enemy_gold_skull_cry
+entry enemy_goron_child_cry
+entry enemy_boss_gohma_hurt
+entry enemy_tektite_land_water1
+entry enemy_deadhand_burrow
+entry enemy_goron_land
+entry enemy_bug_walk
+entry enemy_boss_twinrova_ice_beam
+entry enemy_skulltula_quiver
+
+.channel enemy_dodongo_walk
+instr FONT01_INSTR_GUNSHOT
+env envelope_68DC
+ldlayer 0, layer_354D
+end
+
+.layer layer_354D
+portamento 0x81, 34, 80
+notedv PITCH_C3, 0x1E, 100
+end
+
+.channel enemy_dodongo_breathe
+ldlayer 0, layer_3559
+end
+
+.layer layer_3559
+instr FONT01_INSTR_DODONGO_ROAR
+notedv PITCH_D4, 0x50, 100
+end
+
+.channel enemy_dodongo_flame
+instr 2
+ldlayer 0, layer_3565
+end
+
+.layer layer_3565
+notedv PITCH_F2, 30000, 100
+rjump layer_3565
+
+.channel enemy_dodongo_hurt
+instr FONT01_INSTR_DODONGO_ROAR
+ldlayer 0, layer_3574
+ldlayer 1, layer_4829
+end
+
+.layer layer_3574
+portamento 0x81, 36, 255
+notedv PITCH_E4, 0xA, 100
+portamento 0x81, 44, 255
+notedv PITCH_B3, 0x24, 100
+end
+
+.channel enemy_dodongo_die
+instr FONT01_INSTR_DODONGO_ROAR
+ldlayer 0, layer_358F
+ldlayer 1, layer_3591
+ldlayer 2, layer_4829
+end
+
+.layer layer_358F
+transpose -6
+
+.layer layer_3591
+portamento 0x81, 38, 255
+notedv PITCH_GF4, 0xA, 100
+portamento 0x81, 46, 255
+notedv PITCH_DF4, 0x5A, 100
+end
+
+.channel enemy_boss_dodongo_exhale
+instr FONT01_INSTR_DODONGO_ROAR
+env envelope_683C
+ldlayer 0, layer_35AC
+ldlayer 1, layer_35AE
+end
+
+.layer layer_35AC
+transpose -12
+
+.layer layer_35AE
+portamento 1, 34, 20
+notedv PITCH_B3, 0x5A, 100
+end
+
+.channel enemy_boss_dodongo_walk
+instr FONT01_INSTR_GUNSHOT
+ldlayer 0, layer_35CA
+ldlayer 1, layer_35C6
+ldlayer 2, layer_35C2
+end
+
+.layer layer_35C2
+notedv PITCH_B3, 0x50, 100
+end
+
+.layer layer_35C6
+notedv PITCH_D3, 0x50, 100
+end
+
+.layer layer_35CA
+notedv PITCH_F2, 0x50, 100
+end
+
+.channel enemy_boss_dodongo_flame
+instr 2
+ldlayer 0, layer_35D9
+ldlayer 1, layer_35D7
+end
+
+.layer layer_35D7
+transpose -12
+
+.layer layer_35D9
+notedv PITCH_G3, 30000, 100
+rjump layer_35D9
+
+.channel enemy_larvae_egg_break
+instr FONT01_INSTR_EGG_CRACK
+ldlayer 0, layer_35E5
+end
+
+.layer layer_35E5
+notedv PITCH_F3, 0x50, 100
+end
+
+.channel enemy_boss_gohma_fall
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_35F5
+ldlayer 1, layer_35F7
+ldlayer 2, layer_3606
+end
+
+.layer layer_35F5
+transpose -8
+
+.layer layer_35F7
+env envelope_69DC, 240
+portamento 0x81, 34, 64
+notedv PITCH_C3, 0x32, 100
+notedv PITCH_C1, 0x5A, 100
+end
+
+.layer layer_3606
+env envelope_69DC, 240
+portamento 0x81, 38, 64
+notedv PITCH_E3, 0x32, 100
+end
+
+.channel enemy_goron_land
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_361B
+ldlayer 1, layer_361D
+end
+
+.layer layer_361B
+transpose -8
+
+.layer layer_361D
+env envelope_69DC, 250
+portamento 0x81, 34, 64
+notedv PITCH_C3, 0x62, 100
+end
+
+.channel enemy_lizalfos_land_flat
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_3631
+gain 18
+end
+
+.layer layer_3631
+env envelope_690C, 250
+portamento 0x81, 29, 150
+notedv PITCH_C3, 0x8, 100
+env envelope_68EC, 250
+portamento 0x81, 27, 150
+notedv PITCH_F2, 0x1E, 100
+end
+
+.channel enemy_dodongo_jr_land
+ldlayer 0, layer_364C
+end
+
+.layer layer_364C
+instr FONT01_INSTR_SMASH
+env envelope_68DC, 250
+portamento 0x81, 36, 64
+notedv PITCH_D3, 0x1E, 100
+end
+
+.channel enemy_boss_gohma_walk
+instr FONT01_INSTR_SMASH
+env envelope_68EC
+ldlayer 0, layer_3665
+gain 16
+end
+
+.layer layer_3665
+portamento 0x81, 37, 64
+notedv PITCH_EF3, 0x28, 100
+end
+
+.channel enemy_boss_gohma_climb
+instr FONT01_INSTR_TEKTITE_ROTATE
+ldlayer 1, layer_3676
+ldlayer 0, layer_3678
+end
+
+.layer layer_3676
+transpose 1
+
+.layer layer_3678
+portamento 0x81, 19, 64
+notedv PITCH_G2, 0x14, 100
+end
+
+.channel enemy_boss_gohma_birth
+instr FONT01_INSTR_MONSTER_ROAR
+env envelope_698C
+ldlayer 0, layer_368B
+gain 18
+end
+
+.layer layer_368B
+legato
+portamento 0x85, 20, 255
+notedv PITCH_GF2, 0x28, 100
+notedv PITCH_F2, 0x55, 100
+end
+
+.channel enemy_larvae_walk
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_369D
+end
+
+.layer layer_369D
+portamento 0x81, 31, 255
+notedv PITCH_C3, 0x5, 100
+end
+
+.channel enemy_larvae_chirp
+instr FONT01_INSTR_MECH
+ldlayer 0, layer_36AB
+end
+
+.layer layer_36AB
+portamento 0x81, 48, 255
+notedv PITCH_GF4, 0x1E, 100
+end
+
+.channel enemy_larvae_hurt
+ldlayer 0, layer_4829
+ldlayer 1, layer_36BD
+ldlayer 2, layer_36C1
+end
+
+.layer layer_36BD
+instr FONT01_INSTR_MECH
+rjump layer_36C3
+
+.layer layer_36C1
+instr FONT01_INSTR_MONSTER_ROAR
+.layer layer_36C3
+portamento 0x81, 51, 255
+notedv PITCH_B5, 0xA, 100
+portamento 0x81, 60, 255
+notedv PITCH_E5, 0x12, 100
+end
+
+.channel enemy_larvae_cry
+ldlayer 0, layer_36D6
+end
+
+.layer layer_36D6
+instr FONT01_INSTR_MECH
+portamento 0x81, 51, 255
+notedv PITCH_F5, 0xA, 100
+portamento 0x81, 53, 255
+notedv PITCH_G5, 0xA, 100
+transpose 4
+portamento 0x81, 55, 255
+notedv PITCH_B5, 0xA, 100
+transpose 6
+portamento 0x81, 51, 255
+notedv PITCH_B5, 0x14, 100
+end
+
+.channel enemy_larvae_die
+ldlayer 0, layer_3700
+ldlayer 1, layer_4829
+end
+
+.layer layer_3700
+instr FONT01_INSTR_MECH
+portamento 0x81, 56, 255
+notedv PITCH_C5, 0x5, 100
+portamento 0x81, 54, 255
+notedv PITCH_BF4, 0xA, 100
+portamento 0x81, 51, 255
+notedv PITCH_AF4, 0xA, 100
+portamento 0x81, 47, 255
+notedv PITCH_DF4, 0x14, 100
+end
+
+.channel enemy_boss_gohma_walk_ceiling
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_3728
+ldlayer 1, layer_372C
+end
+
+.layer layer_3728
+notedv PITCH_E3, 0x50, 100
+end
+
+.layer layer_372C
+ldelay 0xF
+notedv PITCH_C4, 0x50, 100
+end
+
+.channel enemy_boss_gohma_hurt_eye
+ldlayer 0, layer_374D
+ldlayer 1, layer_3739
+end
+
+.layer layer_3739
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x85, 39, 255
+notedv PITCH_G4, 0x14, 80
+notedv PITCH_C4, 0x14, 80
+notedv PITCH_E4, 0x14, 80
+notedv PITCH_A3, 0x14, 80
+end
+
+.layer layer_374D
+instr FONT01_INSTR_MONSTER_ROAR
+legato
+portamento 0x85, 39, 255
+notedv PITCH_G4, 0xA, 100
+notedv PITCH_C4, 0xA, 100
+notedv PITCH_G4, 0xA, 100
+notedv PITCH_C4, 0xA, 100
+notedv PITCH_G4, 0xA, 100
+notedv PITCH_C4, 0x5, 100
+end
+
+.channel enemy_larvae_egg_land
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_376F
+gain 18
+end
+
+.layer layer_376F
+legato
+env envelope_68FC, 255
+portamento 0x85, 25, 230
+notedv PITCH_EF3, 0x5, 100
+notedv PITCH_BF2, 0x5, 100
+nolegato
+ldelay 0x5
+legato
+env envelope_68FC, 255
+portamento 0x85, 25, 220
+notedv PITCH_EF3, 0x5, 100
+notedv PITCH_BF2, 0xA, 100
+end
+
+.channel chan_unused_3791
+instr FONT01_INSTR_POE_DISAPPEAR
+ldlayer 0, layer_3797
+end
+
+.layer layer_3797
+notedv PITCH_D4, 0x46, 100
+end
+
+.channel enemy_keese_attack
+instr FONT01_INSTR_KEESE
+ldlayer 0, layer_37A3
+gain 50
+end
+
+.layer layer_37A3
+portamento 0x81, 37, 100
+notedv PITCH_EF4, 0x32, 100
+end
+
+.channel enemy_keese_fly
+ldlayer 0, layer_37AF
+end
+
+.layer layer_37AF
+instr FONT01_INSTR_OWL_FLAP
+portamento 0x81, 36, 255
+notedv PITCH_E4, 0xA, 100
+portamento 0x81, 42, 255
+notedv PITCH_DF4, 0x6, 100
+end
+
+.channel enemy_dodongo_jr_yell
+ldlayer 0, layer_37C7
+ldlayer 1, layer_37D3
+end
+
+.layer layer_37C7
+instr FONT01_INSTR_DODONGO_ROAR
+ldelay 0xA
+portamento 0x81, 48, 64
+notedv PITCH_D5, 0x28, 100
+end
+
+.layer layer_37D3
+instr FONT01_INSTR_GUNSHOT
+env envelope_686C, 240
+transpose 6
+portamento 0x81, 26, 100
+notedv PITCH_B5, 0x32, 100
+end
+
+.channel enemy_dodongo_jr_die
+ldlayer 0, layer_37EA
+ldlayer 1, layer_4829
+end
+
+.layer layer_37EA
+instr FONT01_INSTR_DODONGO_ROAR
+portamento 0x81, 48, 255
+notedv PITCH_D5, 0xA, 100
+portamento 0x81, 55, 255
+notedv PITCH_F4, 0x48, 100
+end
+
+.channel enemy_boss_gohma_roar
+ldlayer 0, layer_3809
+ldlayer 1, layer_3802
+end
+
+.layer layer_3802
+instr FONT01_INSTR_MONSTER_ROAR
+notedv PITCH_E4, 0x96, 70
+end
+
+.layer layer_3809
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x81, 39, 255
+notedv PITCH_D4, 0xA, 100
+portamento 0x81, 41, 255
+notedv PITCH_F4, 0xC8, 100
+end
+
+.channel enemy_boss_gohma_hurt
+ldlayer 0, layer_3838
+ldlayer 1, layer_3826
+ldlayer 2, layer_4829
+end
+
+.layer layer_3826
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x81, 42, 64
+notedv PITCH_BF4, 0x14, 80
+portamento 0x81, 47, 255
+notedv PITCH_AF3, 0x24, 80
+end
+
+.layer layer_3838
+instr FONT01_INSTR_MONSTER_ROAR
+portamento 0x81, 39, 255
+notedv PITCH_G4, 0xF, 100
+portamento 0x81, 44, 255
+notedv PITCH_B3, 0x24, 100
+end
+
+.channel enemy_boss_gohma_growl
+instr FONT01_INSTR_EGG_CRACK
+ldlayer 0, layer_3854
+ldlayer 1, layer_3852
+end
+
+.layer layer_3852
+transpose 2
+
+.layer layer_3854
+notedv PITCH_C2, 0x64, 100
+end
+
+.channel enemy_dodongo_jr_walk
+ldlayer 0, layer_385C
+end
+
+.layer layer_385C
+instr FONT01_INSTR_TEKTITE_ROTATE
+notedv PITCH_D2, 0x1E, 70
+end
+
+.channel enemy_dodongo_jr_burrow
+ldlayer 0, layer_3866
+end
+
+.layer layer_3866
+instr FONT01_INSTR_TEKTITE_ROTATE
+notedv PITCH_BF2, 0x19, 100
+notedv PITCH_AF2, 0x14, 100
+notedv PITCH_BF2, 0xF, 100
+notedv PITCH_AF2, 0xF, 100
+notedv PITCH_BF2, 0xA, 100
+notedv PITCH_AF2, 0xF, 100
+notedv PITCH_BF2, 0xF, 70
+.layer layer_387D
+notedv PITCH_AF2, 0xF, 70
+notedv PITCH_BF2, 0xF, 70
+notedv PITCH_AF2, 0xF, 70
+notedv PITCH_BF2, 0xA, 60
+notedv PITCH_AF2, 0xA, 60
+end
+
+.channel enemy_bug_burrow
+ldlayer 0, layer_3891
+end
+
+.layer layer_3891
+instr FONT01_INSTR_TEKTITE_ROTATE
+rjump layer_387D
+
+.channel enemy_bug_walk
+ldlayer 0, layer_3899
+end
+
+.layer layer_3899
+instr FONT01_INSTR_TEKTITE_ROTATE
+notedv PITCH_AF2, 0x8, 40
+notedv PITCH_G2, 0x8, 40
+end
+
+.channel enemy_dodongo_jr_emerge
+ldlayer 0, layer_38A6
+end
+
+.layer layer_38A6
+instr FONT01_INSTR_TEKTITE_ROTATE
+notedv PITCH_GF2, 0x19, 100
+notedv PITCH_AF2, 0x14, 100
+end
+
+.channel enemy_shop_scrub_burrow
+ldlayer 0, layer_38B6
+ldlayer 1, layer_3866
+end
+
+.layer layer_38B6
+transpose -5
+rjump layer_3866
+
+.channel enemy_leever_emerge
+ldlayer 0, layer_38C1
+ldlayer 1, layer_38A6
+end
+
+.layer layer_38C1
+transpose -2
+ldelay 0x3
+rjump layer_38A6
+
+.channel enemy_dodongo_jr_eat
+instr FONT01_INSTR_GULP_SPEAR
+ldlayer 0, layer_38CD
+end
+
+.layer layer_38CD
+notedv PITCH_C3, 0x30, 100
+end
+
+.channel enemy_stalfos_walk
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_38D7
+end
+
+.layer layer_38D7
+portamento 0x81, 35, 64
+notedv PITCH_DF3, 0xC, 64
+end
+
+.channel enemy_stalfos_laugh
+ldlayer 0, layer_38E5
+gain 16
+end
+
+.layer layer_38E5
+instr FONT01_INSTR_PHANTOM_LAUGH_0
+notedv PITCH_C4, 0x8C, 100
+end
+
+.channel enemy_lizalfos_hurt
+ldlayer 0, layer_38F6
+ldlayer 1, layer_3907
+ldlayer 2, layer_4829
+end
+
+.layer layer_38F6
+instr FONT01_INSTR_LIZALFOS
+portamento 0x81, 33, 255
+notedv PITCH_DF4, 0xF, 100
+portamento 0x81, 38, 255
+notedv PITCH_AF2, 0x28, 100
+end
+
+.layer layer_3907
+instr FONT01_INSTR_MOBLIN_GROWL
+notedv PITCH_C5, 0x5, 100
+notedv PITCH_B4, 0x5, 100
+notedv PITCH_A4, 0x5, 100
+notedv PITCH_E4, 0x5, 100
+end
+
+.channel enemy_lizalfos_laugh
+ldlayer 0, layer_391A
+end
+
+.layer layer_391A
+instr FONT01_INSTR_LAUGHTER
+portamento 0x81, 44, 255
+notedv PITCH_C4, 0x14, 100
+end
+
+.channel enemy_lizalfos_die
+ldlayer 0, layer_392E
+ldlayer 1, layer_393F
+ldlayer 2, layer_4829
+end
+
+.layer layer_392E
+instr FONT01_INSTR_LIZALFOS
+portamento 0x81, 35, 255
+notedv PITCH_E3, 0xF, 100
+portamento 0x81, 31, 255
+notedv PITCH_C3, 0x1E, 100
+end
+
+.layer layer_393F
+instr FONT01_INSTR_MOBLIN_GROWL
+notedv PITCH_AF5, 0x5, 100
+notedv PITCH_F5, 0x5, 100
+notedv PITCH_DF5, 0x5, 100
+notedv PITCH_BF4, 0x5, 100
+end
+
+.channel enemy_stalfos_hurt
+ldlayer 0, layer_3958
+.channel chan_3951
+ldlayer 1, layer_3962
+ldlayer 2, layer_4829
+end
+
+.layer layer_3958
+instr FONT01_INSTR_PHANTOM_MOAN
+portamento 0x81, 47, 100
+notedv PITCH_G4, 0x50, 100
+end
+
+.layer layer_3962
+instr FONT01_INSTR_POT_BREAK
+notedv PITCH_G3, 0x5, 100
+notedv PITCH_G3, 0x5, 100
+end
+
+.channel enemy_stalkid_hurt
+ldlayer 0, layer_3970
+rjump chan_3951
+
+.layer layer_3970
+transpose 19
+rjump layer_3958
+
+.channel enemy_stalfos_die
+ldlayer 0, layer_3984
+.channel chan_3977
+ldlayer 1, layer_3997
+ldlayer 2, layer_4829
+gain 20
+vibfreq 50
+vibdepth 10
+end
+
+.layer layer_3984
+instr FONT01_INSTR_PHANTOM_MOAN
+legato
+portamento 0x85, 43, 200
+notedv PITCH_AF4, 0x1E, 100
+notedv PITCH_A3, 0x8C, 100
+notedv PITCH_E4, 0xC8, 100
+end
+
+.layer layer_3997
+instr FONT01_INSTR_POT_BREAK
+notedv PITCH_G3, 0x5, 100
+notedv PITCH_G3, 0xF, 100
+end
+
+.channel enemy_stalkid_die
+ldlayer 0, layer_39A5
+rjump chan_3977
+
+.layer layer_39A5
+transpose 14
+rjump layer_3984
+
+.channel enemy_firehead_cry
+ldlayer 0, layer_39A5
+end
+
+.channel enemy_lizalfos_walk
+ldlayer 0, layer_39B1
+end
+
+.layer layer_39B1
+instr FONT01_INSTR_LIZALFOS
+transpose 48
+notedv PITCH_DF4, 0xA, 80
+end
+
+.channel enemy_lizalfos_land
+ldlayer 0, layer_39BD
+end
+
+.layer layer_39BD
+instr FONT01_INSTR_LIZALFOS
+transpose 48
+notedv PITCH_E4, 0xA, 80
+notedv PITCH_D4, 0xA, 80
+end
+
+.channel enemy_lizalfos_jump
+ldlayer 0, layer_39DD
+ldlayer 1, layer_39D2
+ldlayer 2, layer_39ED
+end
+
+.layer layer_39D2
+instr FONT01_INSTR_LIZALFOS
+transpose 48
+notedv PITCH_E4, 0xA, 100
+notedv PITCH_GF4, 0xA, 100
+end
+
+.layer layer_39DD
+instr FONT01_INSTR_GUNSHOT
+env envelope_686C, 240
+transpose 4
+portamento 0x81, 26, 50
+notedv PITCH_B5, 0x50, 100
+end
+
+.layer layer_39ED
+instr FONT01_INSTR_MOBLIN_GROWL
+ldelay 0xA
+notedv PITCH_EF4, 0x5, 100
+notedv PITCH_D4, 0x5, 100
+notedv PITCH_C4, 0x5, 100
+notedv PITCH_C4, 0x5, 100
+end
+
+.channel enemy_armos_hop
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_3A04
+end
+
+.layer layer_3A04
+portamento 0x81, 39, 200
+notedv PITCH_A3, 0x14, 100
+end
+
+.channel enemy_armos_awaken
+instr FONT01_INSTR_SMASH
+env envelope_690C
+ldlayer 1, layer_3A18
+ldlayer 0, layer_3A2E
+end
+
+.layer layer_3A18
+notedv PITCH_E2, 0xA, 100
+notedv PITCH_GF2, 0xA, 100
+notedv PITCH_E2, 0xA, 100
+notedv PITCH_GF2, 0xA, 100
+notedv PITCH_E2, 0xA, 100
+notedv PITCH_GF2, 0xA, 100
+notedv PITCH_E2, 0xA, 100
+end
+
+.layer layer_3A2E
+instr FONT01_INSTR_PHANTOM_WAIL
+env envelope_699C, 250
+legato
+portamento 0x85, 23, 255
+notedv PITCH_C4, 0x1E, 100
+notedv PITCH_F3, 0x52, 100
+end
+
+.channel enemy_armos_die
+ldlayer 0, layer_3A47
+ldlayer 1, layer_4829
+end
+
+.layer layer_3A47
+instr FONT01_INSTR_PHANTOM_WAIL
+env envelope_699C, 240
+legato
+portamento 0x85, 37, 200
+notedv PITCH_GF4, 0x1E, 100
+notedv PITCH_GF3, 0x64, 100
+end
+
+.channel enemy_armos_roar
+instr FONT01_INSTR_PHANTOM_WAIL
+env envelope_699C
+gain 19
+ldlayer 0, layer_3A64
+end
+
+.layer layer_3A64
+legato
+portamento 0x85, 23, 255
+notedv PITCH_C4, 0x1E, 100
+notedv PITCH_F3, 0x52, 100
+end
+
+.channel enemy_stalfos_attack
+ldlayer 0, layer_3A79
+ldlayer 1, layer_3A87
+gain 20
+end
+
+.layer layer_3A79
+instr FONT01_INSTR_STALFOS_ATTACK
+legato
+portamento 0x85, 30, 30
+notedv PITCH_BF4, 0x14, 100
+notedv PITCH_A4, 0x14, 100
+end
+
+.layer layer_3A87
+instr FONT01_INSTR_GERUDO_ATTACK
+env envelope_682C, 240
+ldelay 0xA
+notedv PITCH_B3, 0x1E, 100
+end
+
+.channel enemy_armos_hurt
+ldlayer 0, layer_3A9A
+ldlayer 1, layer_4829
+end
+
+.layer layer_3A9A
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 39, 100
+notedv PITCH_F4, 0x1E, 100
+notedv PITCH_C4, 0x1E, 100
+end
+
+.channel enemy_boss_dodongo_demo_wall
+instr FONT01_INSTR_GUNSHOT
+ldlayer 0, layer_3AB4
+ldlayer 1, layer_3ABF
+ldlayer 2, layer_3ACA
+end
+
+.layer layer_3AB4
+notedv PITCH_GF3, 0x14, 100
+env envelope_688C, 240
+notedv PITCH_AF2, 0x64, 100
+end
+
+.layer layer_3ABF
+notedv PITCH_BF3, 0x14, 100
+env envelope_688C, 240
+notedv PITCH_C3, 0x64, 100
+end
+
+.layer layer_3ACA
+notedv PITCH_DF4, 0x14, 100
+env envelope_688C, 240
+notedv PITCH_EF3, 0x64, 100
+end
+
+.channel enemy_boss_dodongo_wall_hit
+instr FONT01_INSTR_GUNSHOT
+ldlayer 0, layer_3ADE
+ldlayer 1, layer_3AE9
+end
+
+.layer layer_3ADE
+notedv PITCH_GF3, 0x14, 100
+env envelope_688C, 240
+notedv PITCH_AF2, 0x32, 100
+end
+
+.layer layer_3AE9
+notedv PITCH_B3, 0x14, 100
+env envelope_688C, 240
+notedv PITCH_DF3, 0x32, 100
+end
+
+.channel enemy_boss_dodongo_roll
+ldlayer 0, layer_3B01
+ldlayer 1, layer_3AFF
+vibfreq 20
+vibdepth 100
+end
+
+.layer layer_3AFF
+transpose 12
+
+.layer layer_3B01
+instr FONT01_INSTR_BOULDER
+.layer layer_3B03
+notedv PITCH_C4, 30000, 100
+rjump layer_3B03
+
+.channel enemy_boss_dodongo_inhale
+instr FONT01_INSTR_DINO_INHALE
+ldlayer 0, layer_3B14
+ldlayer 1, layer_3B12
+end
+
+.layer layer_3B12
+transpose -4
+
+.layer layer_3B14
+legato
+portamento 0x81, 27, 255
+notedv PITCH_F3, 0xAA, 100
+.layer layer_3B1D
+notedv PITCH_F3, 30000, 100
+rjump layer_3B1D
+
+.channel enemy_boss_dodongo_swallow
+instr FONT01_INSTR_GULP_SPEAR
+ldlayer 0, layer_3B2E
+ldlayer 1, layer_3B30
+gain 24
+end
+
+.layer layer_3B2E
+transpose -2
+
+.layer layer_3B30
+notedv PITCH_C3, 0x46, 100
+end
+
+.channel enemy_boss_dodongo_paralyzed
+instr FONT01_INSTR_DODONGO_ROAR
+env envelope_683C
+ldlayer 0, layer_3B40
+ldlayer 1, layer_3B42
+end
+
+.layer layer_3B40
+transpose -4
+
+.layer layer_3B42
+legato
+portamento 0x85, 15, 255
+notedv PITCH_D2, 0x32, 100
+notedv PITCH_B1, 0x32, 100
+nolegato
+rjump layer_3B42
+
+.channel enemy_dodongo_inhale
+instr FONT01_INSTR_DINO_INHALE
+ldlayer 0, layer_3B56
+end
+
+.layer layer_3B56
+notedv PITCH_E3, 30000, 100
+rjump layer_3B56
+
+.channel enemy_big_baba_chomp
+instr FONT01_INSTR_BABA_ATTACK
+ldlayer 0, layer_3B62
+end
+
+.layer layer_3B62
+notedv PITCH_F3, 0x1E, 100
+end
+
+.channel enemy_big_baba_attack
+ldlayer 0, layer_3B6A
+end
+
+.layer layer_3B6A
+instr FONT01_INSTR_BABA_LUNGE
+transpose 48
+portamento 0x81, 39, 200
+notedv PITCH_E4, 0x32, 100
+end
+
+.channel enemy_big_baba_hurt
+ldlayer 0, layer_3B7D
+ldlayer 1, layer_4829
+end
+
+.layer layer_3B7D
+instr FONT01_INSTR_GUAY_HURT
+portamento 0x81, 44, 255
+notedv PITCH_C5, 0xA, 100
+portamento 0x81, 53, 255
+notedv PITCH_F4, 0x1E, 100
+end
+
+.channel enemy_big_baba_die
+ldlayer 0, layer_3B99
+ldlayer 1, layer_4829
+vibfreq 100
+vibdepth 127
+end
+
+.layer layer_3B99
+instr FONT01_INSTR_MONSTER_ROAR
+env envelope_69AC, 255
+legato
+portamento 0x85, 31, 255
+notedv PITCH_C4, 0x1E, 100
+notedv PITCH_C3, 0x78, 100
+end
+
+.channel enemy_shell_die
+ldlayer 0, layer_3BB9
+ldlayer 1, layer_4BA9
+ldlayer 2, layer_4829
+vibfreq 48
+vibdepth 128
+end
+
+.layer layer_3BB9
+transpose 3
+rjump layer_3B99
+
+.channel enemy_deku_baba_chomp
+instr FONT01_INSTR_BABA_ATTACK
+ldlayer 0, layer_3BC3
+end
+
+.layer layer_3BC3
+notedv PITCH_F4, 0xF, 100
+end
+
+.channel enemy_deku_baba_attack
+ldlayer 0, layer_3BCB
+end
+
+.layer layer_3BCB
+instr FONT01_INSTR_BABA_LUNGE
+transpose 48
+portamento 0x81, 48, 255
+notedv PITCH_C5, 0x1E, 100
+end
+
+.channel enemy_deku_baba_die
+instr FONT01_INSTR_MONSTER_ROAR
+env envelope_684C
+ldlayer 0, layer_3BE7
+ldlayer 1, layer_4829
+vibfreq 100
+vibdepth 127
+end
+
+.layer layer_3BE7
+legato
+portamento 0x85, 49, 200
+notedv PITCH_GF5, 0x1E, 100
+notedv PITCH_GF4, 0x32, 100
+end
+
+.channel enemy_deku_baba_slide
+ldlayer 0, layer_3BFC
+instr FONT01_INSTR_TEKTITE_ROTATE
+env envelope_68BC
+end
+
+.layer layer_3BFC
+portamento 0x81, 13, 255
+notedv PITCH_G1, 0x38, 80
+end
+
+.channel enemy_keese_die
+ldlayer 0, layer_3C0B
+ldlayer 1, layer_4829
+end
+
+.layer layer_3C0B
+instr FONT01_INSTR_GUAY_HURT
+portamento 0x81, 44, 255
+notedv PITCH_C5, 0xA, 100
+portamento 0x81, 53, 255
+notedv PITCH_F4, 0x1E, 100
+end
+
+.channel enemy_tailpasaran_fly
+instr FONT01_INSTR_BABA_LUNGE
+ldlayer 0, layer_3C26
+vibfreq 64
+vibdepth 128
+end
+
+.layer layer_3C26
+notedv PITCH_BF2, 30000, 80
+rjump layer_3C26
+
+.channel enemy_tailpasaran_cry
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_3C32
+end
+
+.layer layer_3C32
+portamento 0x81, 14, 60
+notedv PITCH_E2, 0x32, 100
+end
+
+.channel enemy_tailpasaran_die
+ldlayer 0, layer_3C45
+ldlayer 1, layer_4829
+vibfreq 112
+vibdepth 112
+end
+
+.layer layer_3C45
+instr FONT01_INSTR_GUAY_HURT
+portamento 0x81, 35, 96
+notedv PITCH_C5, 0x14, 100
+portamento 0x81, 44, 207
+notedv PITCH_C4, 0x30, 100
+end
+
+.channel enemy_skulltula_climb
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_3C5F
+ldlayer 1, layer_3C67
+end
+
+.layer layer_3C5F
+portamento 0x81, 39, 100
+notedv PITCH_E4, 0x32, 100
+end
+
+.layer layer_3C67
+ldelay 0x5
+portamento 0x81, 37, 100
+notedv PITCH_D4, 0x32, 100
+end
+
+.channel enemy_skulltula_drop
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_3C7A
+ldlayer 1, layer_3C82
+end
+
+.layer layer_3C7A
+portamento 0x81, 43, 100
+notedv PITCH_C4, 0x32, 100
+end
+
+.layer layer_3C82
+ldelay 0x5
+portamento 0x81, 41, 100
+notedv PITCH_BF3, 0x32, 100
+end
+
+.channel enemy_skulltula_quiver
+instr FONT01_INSTR_LAUGHTER
+env envelope_699C
+ldlayer 0, layer_3C9B
+gain 16
+vibfreq 100
+vibdepth 127
+end
+
+.layer layer_3C9B
+notedv PITCH_F1, 0x64, 100
+end
+
+.channel enemy_tektite_turn_ground
+ldlayer 0, layer_3CA3
+end
+
+.layer layer_3CA3
+instr FONT01_INSTR_TEKTITE_ROTATE
+notedv PITCH_C4, 0xA, 70
+end
+
+.channel enemy_poe_attack_charge
+ldlayer 0, layer_3CB0
+ldlayer 1, layer_3CB6
+end
+
+.layer layer_3CB0
+instr FONT01_INSTR_OWL_FLAP
+notedv PITCH_F3, 0x19, 100
+end
+
+.layer layer_3CB6
+instr FONT01_INSTR_POT_BREAK
+notedv PITCH_F3, 0xA, 30
+end
+
+.channel enemy_poe_float
+instr FONT01_INSTR_POE_DISAPPEAR
+env envelope_69AC
+ldlayer 0, layer_3CC9
+vibfreq 20
+vibdepth 127
+end
+
+.layer layer_3CC9
+notedv PITCH_F3, 0x87, 100
+rjump layer_3CC9
+
+.channel enemy_poe_retreat
+instr FONT01_INSTR_POE_DISAPPEAR
+ldlayer 0, layer_3CD9
+vibfreq 60
+vibdepth 100
+end
+
+.layer layer_3CD9
+notedv PITCH_E4, 0x32, 100
+ldelay 0xA
+rjump layer_3CD9
+
+.channel enemy_poe_vanish
+instr FONT01_INSTR_POE_DISAPPEAR
+env envelope_69BC
+ldlayer 0, layer_3CED
+vibfreq 100
+vibdepth 100
+end
+
+.layer layer_3CED
+portamento 0x81, 43, 255
+notedv PITCH_C2, 0x96, 100
+end
+
+.channel enemy_poe_appear
+instr FONT01_INSTR_POE_DISAPPEAR
+ldlayer 0, layer_3D00
+vibfreq 100
+vibdepth 100
+end
+
+.layer layer_3D00
+portamento 0x81, 15, 200
+notedv PITCH_E4, 0x96, 100
+end
+
+.channel enemy_poe_hurt
+instr FONT01_INSTR_POE_DISAPPEAR
+ldlayer 0, layer_3D14
+ldlayer 1, layer_4829
+gain 24
+end
+
+.layer layer_3D14
+portamento 0x81, 49, 200
+notedv PITCH_A5, 0xA, 100
+portamento 0x81, 60, 155
+notedv PITCH_E5, 0x1E, 100
+end
+
+.channel enemy_poe_die
+ldlayer 0, layer_3D2C
+ldlayer 1, layer_4829
+gain 24
+end
+
+.layer layer_3D2C
+instr FONT01_INSTR_POE_DISAPPEAR
+portamento 0x81, 49, 200
+notedv PITCH_A5, 0xA, 100
+portamento 0x81, 60, 155
+notedv PITCH_E5, 0x3C, 100
+end
+
+.channel enemy_boss_dodongo_roar
+ldlayer 0, layer_3D47
+ldlayer 1, layer_3D52
+ldlayer 2, layer_3D5D
+end
+
+.layer layer_3D47
+instr FONT01_INSTR_MONSTER_ROAR
+portamento 0x85, 11, 50
+notedv PITCH_C3, 0x12C, 100
+end
+
+.layer layer_3D52
+instr FONT01_INSTR_MONSTER_ROAR
+portamento 0x85, 13, 50
+notedv PITCH_D3, 0x122, 100
+end
+
+.layer layer_3D5D
+instr FONT01_INSTR_DODONGO_ROAR
+portamento 0x81, 12, 255
+notedv PITCH_DF2, 0xC8, 100
+end
+
+.channel enemy_boss_gohma_eyeroll
+instr FONT01_INSTR_EGG_CRACK
+ldlayer 0, layer_3D75
+ldlayer 1, layer_3D73
+gain 18
+end
+
+.layer layer_3D73
+transpose 4
+
+.layer layer_3D75
+portamento 0x81, 3, 200
+notedv PITCH_E1, 0x8C, 100
+end
+
+.channel enemy_boss_dodongo_die
+ldlayer 0, layer_3DB4
+ldlayer 1, layer_3D8F
+ldlayer 2, layer_3D91
+ldlayer 3, layer_4829
+vibfreq 20
+vibdepth 50
+end
+
+.layer layer_3D8F
+transpose -6
+
+.layer layer_3D91
+instr FONT01_INSTR_DODONGO_ROAR
+portamento 0x85, 38, 255
+notedv PITCH_E4, 0x1E, 100
+notedv PITCH_B2, 0x96, 100
+transpose -5
+env envelope_69DC, 127
+portamento 0x85, 31, 255
+notedv PITCH_A3, 0x3C, 80
+env envelope_6A3C, 127
+notedv PITCH_D2, 0xE6, 80
+end
+
+.layer layer_3DB4
+instr FONT01_INSTR_MONSTER_ROAR
+env envelope_69CC, 230
+portamento 0x81, 15, 20
+notedv PITCH_E3, 0x96, 100
+env envelope_6A2C, 240
+portamento 0x81, 31, 100
+notedv PITCH_C2, 0x10E, 100
+end
+
+.channel enemy_boss_dodongo_dying_groan
+ldlayer 0, layer_3DDF
+ldlayer 1, layer_3DEA
+ldlayer 2, layer_3DF5
+gain 20
+vibfreq 70
+vibdepth 50
+end
+
+.layer layer_3DDF
+instr FONT01_INSTR_MONSTER_ROAR
+portamento 0x81, 13, 50
+notedv PITCH_D3, 0x118, 100
+end
+
+.layer layer_3DEA
+instr FONT01_INSTR_MONSTER_ROAR
+portamento 0x81, 11, 50
+notedv PITCH_C3, 0x122, 100
+end
+
+.layer layer_3DF5
+instr FONT01_INSTR_DODONGO_ROAR
+portamento 0x81, 12, 255
+notedv PITCH_DF2, 0xC8, 100
+end
+
+.channel enemy_boss_dodongo_fossilize
+instr 2
+ldlayer 0, layer_3E0F
+ldlayer 1, layer_3E11
+gain 16
+vibfreq 10
+vibdepth 20
+end
+
+.layer layer_3E0F
+transpose -8
+
+.layer layer_3E11
+notedv PITCH_E2, 30000, 100
+rjump layer_3E11
+
+.channel enemy_boss_dodongo_lava
+instr FONT01_INSTR_EXPLOSION_LAVA
+env envelope_682C
+gain 20
+ldlayer 0, layer_3E25
+ldlayer 1, layer_3E29
+end
+
+.layer layer_3E25
+transpose 42
+rjump layer_3E2B
+
+.layer layer_3E29
+transpose 48
+.layer layer_3E2B
+notedv PITCH_C5, 0x46, 100
+notedv PITCH_F4, 0x46, 100
+notedv PITCH_C4, 0x46, 100
+notedv PITCH_BF3, 0x32, 100
+notedv PITCH_G3, 0x28, 100
+notedv PITCH_EF3, 0x28, 100
+notedv PITCH_D3, 0x1E, 100
+notedv PITCH_BF2, 0x1E, 100
+end
+
+.channel enemy_boss_dodongo_hurt
+instr FONT01_INSTR_DODONGO_ROAR
+env envelope_683C
+ldlayer 0, layer_3E60
+ldlayer 1, layer_3E56
+ldlayer 2, layer_3E58
+ldlayer 3, layer_4829
+end
+
+.layer layer_3E56
+transpose -8
+
+.layer layer_3E58
+portamento 1, 38, 20
+notedv PITCH_EF4, 0x50, 100
+end
+
+.layer layer_3E60
+portamento 0x85, 31, 150
+notedv PITCH_C4, 0x14, 100
+notedv PITCH_B3, 0x46, 100
+end
+
+.channel enemy_stalfos_jump
+ldlayer 0, layer_3E6F
+end
+
+.layer layer_3E6F
+instr FONT01_INSTR_GUNSHOT
+env envelope_686C, 255
+transpose 4
+portamento 0x81, 26, 50
+notedv PITCH_B5, 0x50, 100
+end
+
+.channel enemy_boss_gohma_die
+env envelope_687C
+ldlayer 0, layer_3E93
+ldlayer 1, layer_3E95
+ldlayer 2, layer_3EB4
+ldlayer 3, layer_4829
+vibfreq 20
+vibdepth 50
+end
+
+.layer layer_3E93
+transpose -6
+
+.layer layer_3E95
+instr FONT01_INSTR_DINO_ROAR
+portamento 0x85, 38, 255
+notedv PITCH_E4, 0x1E, 100
+notedv PITCH_B2, 0x96, 100
+transpose -5
+portamento 0x85, 32, 255
+notedv PITCH_C4, 0x3C, 80
+env envelope_6A3C, 200
+notedv PITCH_B2, 0xC8, 80
+end
+
+.layer layer_3EB4
+instr FONT01_INSTR_MONSTER_ROAR
+env envelope_69CC, 200
+portamento 0x81, 15, 20
+notedv PITCH_E3, 0x96, 100
+env envelope_6A2C, 200
+portamento 0x81, 31, 100
+notedv PITCH_C2, 0x12C, 100
+end
+
+.channel enemy_scrub_emerge
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_3ED8
+ldlayer 1, layer_3EDA
+end
+
+.layer layer_3ED8
+transpose -2
+
+.layer layer_3EDA
+portamento 0x81, 31, 64
+notedv PITCH_C4, 0x32, 100
+end
+
+.channel enemy_scrub_burrow
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_3EEB
+ldlayer 1, layer_3EED
+end
+
+.layer layer_3EEB
+transpose -2
+
+.layer layer_3EED
+portamento 0x81, 39, 64
+notedv PITCH_E3, 0x32, 100
+end
+
+.channel enemy_scrub_spit
+instr 2
+ldlayer 0, layer_3EFD
+gain 32
+end
+
+.layer layer_3EFD
+portamento 0x81, 31, 64
+notedv PITCH_C4, 0xC, 100
+end
+
+.channel enemy_scrub_walk
+ldlayer 0, layer_3F0C
+ldlayer 1, layer_5320
+end
+
+.layer layer_3F0C
+instr FONT01_INSTR_GRASS_RUSTLE
+notedv PITCH_DF4, 0x20, 70
+end
+
+.channel enemy_scrub_hurt
+ldlayer 0, layer_3F16
+end
+
+.layer layer_3F16
+instr FONT01_INSTR_SCRUB_DEATH
+transpose 4
+portamento 0x81, 51, 255
+notedv PITCH_B5, 0xA, 100
+portamento 0x81, 60, 255
+notedv PITCH_E5, 0x19, 100
+end
+
+.channel enemy_scrub_die
+ldlayer 0, layer_3F2D
+end
+
+.layer layer_3F2D
+instr FONT01_INSTR_SCRUB_DEATH
+portamento 0x81, 59, 255
+notedv PITCH_E5, 0xA, 100
+portamento 0x81, 51, 255
+notedv PITCH_F4, 0x1E, 100
+end
+
+.channel enemy_boss_gohma_dissolve
+ldlayer 0, layer_3F49
+ldlayer 1, layer_3F4B
+vibfreq 10
+vibdepth 20
+end
+
+.layer layer_3F49
+transpose -1
+
+.layer layer_3F4B
+instr 2
+.layer layer_3F4D
+notedv PITCH_EF1, 30000, 100
+rjump layer_3F4D
+
+.channel enemy_tektite_hurt
+instr FONT01_INSTR_GUAY_HURT
+env envelope_65D8
+ldlayer 0, layer_3F5F
+ldlayer 1, layer_4829
+end
+
+.layer layer_3F5F
+portamento 0x81, 36, 255
+notedv PITCH_E4, 0xA, 100
+portamento 0x81, 44, 255
+notedv PITCH_B3, 0x1E, 100
+end
+
+.channel enemy_tektite_die
+ldlayer 0, layer_3F78
+ldlayer 1, layer_3F89
+ldlayer 2, layer_4829
+end
+
+.layer layer_3F78
+instr FONT01_INSTR_DODONGO_ROAR
+portamento 0x81, 32, 255
+notedv PITCH_C4, 0xA, 100
+portamento 0x81, 40, 255
+notedv PITCH_G3, 0x5C, 100
+end
+
+.layer layer_3F89
+instr FONT01_INSTR_GUAY_HURT
+portamento 0x81, 43, 255
+notedv PITCH_B4, 0xF, 80
+portamento 0x81, 48, 255
+notedv PITCH_EF4, 0x24, 80
+end
+
+.channel enemy_stinger_hurt
+instr FONT01_INSTR_GUAY_HURT
+ldlayer 0, layer_3FA7
+ldlayer 1, layer_4829
+vibfreq 48
+vibdepth 48
+end
+
+.layer layer_3FA7
+transpose -10
+rjump layer_3F5F
+end
+
+.channel enemy_stinger_die
+ldlayer 0, layer_3FBA
+ldlayer 1, layer_3FCB
+ldlayer 2, layer_4829
+vibfreq 48
+vibdepth 48
+end
+
+.layer layer_3FBA
+instr FONT01_INSTR_DODONGO_ROAR
+portamento 0x81, 22, 127
+notedv PITCH_DF4, 0x28, 100
+portamento 0x81, 38, 255
+notedv PITCH_A2, 0x7F, 100
+end
+
+.layer layer_3FCB
+transpose -12
+rjump layer_3F89
+end
+
+.channel enemy_skulltula_hurt
+ldlayer 0, layer_4829
+ldlayer 1, layer_3FD7
+end
+
+.layer layer_3FD7
+instr FONT01_INSTR_DINO_INHALE
+portamento 0x81, 51, 255
+notedv PITCH_B5, 0xA, 100
+portamento 0x81, 60, 255
+notedv PITCH_E5, 0x14, 100
+end
+
+.channel enemy_gold_skull_cry
+ldlayer 0, layer_3FD7
+end
+
+.channel enemy_skulltula_pivot
+instr FONT01_INSTR_OWL_FLAP
+ldlayer 0, layer_3FF2
+end
+
+.layer layer_3FF2
+portamento 0x81, 51, 255
+notedv PITCH_B5, 0x14, 100
+portamento 0x81, 60, 255
+notedv PITCH_E5, 0x14, 100
+end
+
+.channel enemy_skullwall_die
+ldlayer 0, layer_400C
+ldlayer 1, layer_4829
+vibfreq 100
+vibdepth 127
+end
+
+.layer layer_400C
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x85, 29, 255
+notedv PITCH_BF3, 0x14, 100
+notedv PITCH_BF2, 0x3C, 100
+end
+
+.channel enemy_dissolve
+instr 2
+env envelope_68DC
+ldlayer 0, layer_4023
+end
+
+.layer layer_4023
+portamento 0x81, 7, 100
+notedv PITCH_A1, 0x19, 100
+end
+
+.channel enemy_boss_gohma_thrust
+instr FONT01_INSTR_MONSTER_ROAR
+env envelope_68EC
+ldlayer 0, layer_4038
+vibfreq 100
+vibdepth 50
+end
+
+.layer layer_4038
+portamento 0x81, 45, 250
+notedv PITCH_GF3, 0x28, 100
+end
+
+.channel enemy_lizalfos_cry
+ldlayer 0, layer_404B
+ldlayer 1, layer_4057
+vibfreq 50
+vibdepth 60
+end
+
+.layer layer_404B
+instr FONT01_INSTR_BABA_LUNGE
+transpose 48
+portamento 0x81, 32, 100
+notedv PITCH_D3, 0x23, 80
+end
+
+.layer layer_4057
+instr FONT01_INSTR_LIZALFOS
+portamento 0x81, 39, 100
+notedv PITCH_A3, 0x28, 100
+end
+
+.channel enemy_lizalfos_attack_shout
+ldlayer 1, layer_406B
+ldlayer 0, layer_4077
+ldlayer 2, layer_4081
+end
+
+.layer layer_406B
+instr FONT01_INSTR_BABA_LUNGE
+transpose 48
+portamento 0x81, 34, 200
+notedv PITCH_B3, 0x23, 80
+end
+
+.layer layer_4077
+instr FONT01_INSTR_LIZALFOS
+portamento 0x81, 39, 255
+notedv PITCH_F4, 0x32, 100
+end
+
+.layer layer_4081
+instr FONT01_INSTR_GERUDO_ATTACK
+env envelope_682C, 240
+ldelay 0xA
+notedv PITCH_D4, 0x1E, 100
+end
+
+.channel enemy_dodongo_swipe
+instr FONT01_INSTR_GUNSHOT
+env envelope_686C
+ldlayer 0, layer_4098
+gain 20
+end
+
+.layer layer_4098
+transpose 5
+portamento 0x81, 26, 200
+notedv PITCH_B5, 0xC8, 100
+end
+
+.channel enemy_poe_transform
+instr FONT01_INSTR_POE_DISAPPEAR
+env envelope_69BC
+ldlayer 0, layer_40B0
+vibfreq 100
+vibdepth 100
+end
+
+.layer layer_40B0
+portamento 0x81, 55, 255
+notedv PITCH_C3, 0x50, 100
+end
+
+.channel enemy_wallmaster_fall
+instr FONT01_INSTR_POE_DISAPPEAR
+ldlayer 0, layer_40C1
+ldlayer 1, layer_40C3
+end
+
+.layer layer_40C1
+transpose -6
+
+.layer layer_40C3
+notedv PITCH_C3, 0x1A0, 100
+end
+
+.channel enemy_wallmaster_retreat
+instr FONT01_INSTR_POE_DISAPPEAR
+env envelope_69FC
+ldlayer 0, layer_40D3
+gain 16
+end
+
+.layer layer_40D3
+portamento 0x81, 36, 100
+notedv PITCH_C4, 0x78, 100
+end
+
+.channel enemy_floormaster_walk
+instr FONT01_INSTR_EGG_CRACK
+ldlayer 0, layer_40E3
+gain 20
+end
+
+.layer layer_40E3
+portamento 0x81, 9, 128
+notedv PITCH_A1, 0xF, 100
+end
+
+.channel enemy_floormaster_hurt
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_40F8
+ldlayer 1, layer_4829
+vibfreq 100
+vibdepth 70
+end
+
+.layer layer_40F8
+legato
+portamento 0x85, 42, 128
+notedv PITCH_AF4, 0x1E, 100
+notedv PITCH_C4, 0x28, 100
+end
+
+.channel enemy_floormaster_die
+ldlayer 0, layer_410F
+ldlayer 1, layer_4829
+vibfreq 132
+vibdepth 70
+end
+
+.layer layer_410F
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x85, 46, 128
+notedv PITCH_C5, 0x28, 100
+notedv PITCH_E4, 0x30, 100
+end
+
+.channel enemy_biri_float
+instr FONT01_INSTR_STALFOS_ATTACK
+env envelope_6A0C
+ldlayer 0, layer_4126
+end
+
+.layer layer_4126
+legato
+portamento 0x85, 31, 255
+notedv PITCH_A3, 0x32, 100
+notedv PITCH_AF2, 0x46, 100
+end
+
+.channel enemy_biri_fly
+ldlayer 0, layer_414B
+ldlayer 1, layer_4139
+end
+
+.layer layer_4139
+instr 2
+env envelope_6A0C, 220
+legato
+portamento 0x85, 27, 200
+notedv PITCH_F3, 0x14, 60
+notedv PITCH_E2, 0x32, 60
+end
+
+.layer layer_414B
+instr FONT01_INSTR_STALFOS_ATTACK
+env envelope_6A0C, 128
+legato
+portamento 0x85, 31, 200
+notedv PITCH_A3, 0x32, 100
+notedv PITCH_AF2, 0x46, 100
+end
+
+.channel enemy_biri_shock
+instr FONT01_INSTR_GANONDORF_ATTACK_0
+.channel chan_415F
+ldlayer 0, layer_4179
+.channel chan_4162
+rand 6
+stseq 3, layer_4179+1
+stseq 3, chan_4172+1
+rand 8
+stseq 91, layer_4179
+.channel chan_4172
+ldi 1
+call delay_varyingvol
+rjump chan_4162
+
+.layer layer_4179
+notedv PITCH_C3, 0x50, 80
+rjump layer_4179
+
+.channel enemy_boss_ganon_transform
+instr FONT01_INSTR_GANONDORF_ATTACK_0
+releaserate 208
+rjump chan_415F
+
+.channel enemy_biri_die
+ldlayer 0, layer_4829
+ldlayer 1, layer_418B
+end
+
+.layer layer_418B
+instr FONT01_INSTR_GUAY_HURT
+portamento 0x81, 32, 255
+notedv PITCH_C4, 0xA, 100
+portamento 0x81, 41, 255
+notedv PITCH_F3, 0xE, 100
+end
+
+.channel enemy_torch_slug_hurt
+ldlayer 0, layer_41A6
+ldlayer 1, layer_41B8
+ldlayer 2, layer_4829
+end
+
+.layer layer_41A6
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x81, 32, 64
+notedv PITCH_C4, 0x14, 80
+portamento 0x81, 37, 255
+notedv PITCH_BF2, 0x24, 80
+end
+
+.layer layer_41B8
+transpose -8
+rjump layer_418B
+
+.channel enemy_biri_die_bubbles
+ldlayer 0, layer_41C0
+end
+
+.layer layer_41C0
+instr FONT01_INSTR_WATER_BUBBLES
+env envelope_6A1C, 249
+portamento 0x81, 25, 255
+notedv PITCH_G3, 0x90, 100
+end
+
+.channel enemy_phantom_reveal
+instr FONT01_INSTR_DINO_ROAR
+env envelope_69CC
+ldlayer 0, layer_41E0
+vibfreqgrad 70, 110, 18
+vibdepthgrad 20, 80, 10
+end
+
+.layer layer_41E0
+portamento 0x81, 21, 255
+notedv PITCH_BF2, 0xE6, 100
+end
+
+.channel enemy_phantom_lightning
+ldlayer 0, layer_41EF
+gain 22
+end
+
+.layer layer_41EF
+instr FONT01_INSTR_ELECTRIC_ATTACK
+notedv PITCH_C4, 0x118, 100
+end
+
+.channel enemy_ganondorf_charge
+instr FONT01_INSTR_GANONDORF_ATTACK_0
+ldlayer 0, layer_41FE
+gain 20
+end
+
+.layer layer_41FE
+notedv PITCH_A3, 0x50, 100
+end
+
+.channel enemy_ganondorf_fly
+instr FONT01_INSTR_GANONDORF_FLY
+ldlayer 0, layer_4208
+end
+
+.layer layer_4208
+notedv PITCH_D4, 30000, 100
+rjump layer_4208
+
+.channel enemy_witch_charge
+ldlayer 0, layer_4214
+gain 24
+end
+
+.layer layer_4214
+instr FONT01_INSTR_GANONDORF_CHARGE
+notedv PITCH_F4, 0x5A, 100
+end
+
+.channel enemy_phantom_painting_enter
+ldlayer 0, layer_4220
+gain 24
+end
+
+.layer layer_4220
+instr FONT01_INSTR_SWOOSH
+notedv PITCH_D4, 0x5A, 100
+end
+
+.channel enemy_phantom_shout
+instr FONT01_INSTR_PHANTOM_ATTACK
+ldlayer 0, layer_422E
+gain 24
+end
+
+.layer layer_422E
+portamento 0x81, 39, 50
+notedv PITCH_F4, 0x30, 100
+end
+
+.channel enemy_ganondorf_orb_trail
+ldlayer 0, layer_423E
+vibfreq 128
+vibdepth 128
+end
+
+.layer layer_423E
+instr 2
+legato
+portamento 0x81, 37, 255
+.layer layer_4245
+notedv PITCH_GF3, 0xC8, 100
+rjump layer_4245
+
+.channel enemy_boss_twinrova_ice_reflected
+ldlayer 0, layer_4256
+ldlayer 1, layer_4B32
+vibfreq 128
+vibdepth 96
+end
+
+.layer layer_4256
+instr 2
+transpose 12
+legato
+rjump layer_4245
+
+.channel enemy_ganondorf_lightning_hit
+ldlayer 0, layer_4261
+end
+
+.layer layer_4261
+instr FONT01_INSTR_ELECTRIC_ATTACK
+notedv PITCH_C5, 0x8C, 100
+end
+
+.channel enemy_phantom_attack_unused
+instr FONT01_INSTR_THUNDERBURST
+env envelope_6A5C
+ldlayer 0, layer_4273
+gain 16
+end
+
+.layer layer_4273
+notedv PITCH_E3, 0x1C2, 100
+end
+
+.channel enemy_phantom_staff
+instr FONT01_INSTR_SWOOSH
+ldlayer 0, layer_4280
+gain 20
+end
+
+.layer layer_4280
+ldelay 0xF
+notedv PITCH_C4, 0x7, 100
+notedv PITCH_G4, 0x7, 100
+notedv PITCH_C5, 0x7, 100
+notedv PITCH_G5, 0x7, 100
+notedv PITCH_E4, 0x7, 100
+notedv PITCH_B4, 0x7, 100
+notedv PITCH_E5, 0x7, 100
+notedv PITCH_B5, 0x7, 100
+end
+
+.channel enemy_phantom_eyes
+instr FONT01_INSTR_GANONDORF_CHARGE
+env envelope_699C
+ldlayer 0, layer_42AA
+gain 20
+vibfreq 128
+vibdepth 20
+end
+
+.layer layer_42AA
+portamento 0x81, 33, 255
+notedv PITCH_DF3, 0x6E, 100
+end
+
+.channel enemy_phantom_orb_dissipate
+instr FONT01_INSTR_THUNDERBURST
+ldlayer 0, layer_42B8
+end
+
+.layer layer_42B8
+portamento 0x81, 60, 200
+notedv PITCH_C3, 0x1E, 100
+end
+
+.channel enemy_phantom_die_roar
+instr FONT01_INSTR_PHANTOM_WAIL
+ldlayer 0, layer_42E9
+ldlayer 1, layer_42DD
+ldlayer 2, layer_42D4
+gain 20
+releaserate 244
+vibfreq 50
+vibdepth 30
+end
+
+.layer layer_42D4
+portamento 0x81, 46, 100
+notedv PITCH_D4, 0xB4, 100
+end
+
+.layer layer_42DD
+ldelay 0x96
+portamento 0x81, 36, 220
+notedv PITCH_E3, 0xD2, 100
+end
+
+.layer layer_42E9
+ldelay 0x14A
+portamento 0x81, 31, 200
+notedv PITCH_A2, 0x14A, 100
+end
+
+.channel enemy_phantom_hurt
+ldlayer 0, layer_4301
+ldlayer 1, layer_430F
+ldlayer 2, layer_4829
+gain 20
+end
+
+.layer layer_4301
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 39, 100
+notedv PITCH_A4, 0x1E, 100
+notedv PITCH_C4, 0x3C, 100
+end
+
+.layer layer_430F
+instr FONT01_INSTR_GANONDORF_ATTACK_0
+legato
+portamento 0x81, 29, 100
+notedv PITCH_E4, 0x14, 68
+portamento 0x81, 34, 255
+notedv PITCH_G2, 0x24, 68
+end
+
+.channel enemy_deadhand_hurt
+ldlayer 0, layer_4328
+ldlayer 1, layer_4829
+end
+
+.layer layer_4328
+transpose -7
+rjump layer_4301
+
+.channel enemy_phantom_die
+ldlayer 0, layer_433B
+ldlayer 1, layer_434A
+ldlayer 2, layer_434C
+ldlayer 3, layer_4829
+gain 20
+end
+
+.layer layer_433B
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 36, 255
+notedv PITCH_GF4, 0x50, 100
+notedv PITCH_AF2, 500, 100
+end
+
+.layer layer_434A
+transpose -16
+
+.layer layer_434C
+instr FONT01_INSTR_THUNDERBURST
+notedv PITCH_AF4, 0x1C2, 100
+end
+
+.channel enemy_deadhand_die
+ldlayer 0, layer_435A
+ldlayer 1, layer_4829
+end
+
+.layer layer_435A
+transpose -8
+rjump layer_433B
+
+.channel enemy_phantom_hurt_orb
+instr FONT01_INSTR_PHANTOM_WAIL
+ldlayer 0, layer_436C
+gain 20
+releaserate 249
+vibfreq 127
+vibdepth 70
+end
+
+.layer layer_436C
+legato
+portamento 0x85, 30, 100
+notedv PITCH_G3, 0x1E, 100
+notedv PITCH_C3, 0x14, 100
+end
+
+.channel enemy_phantom_laugh
+instr FONT01_INSTR_PHANTOM_LAUGH_1
+ldlayer 0, layer_4380
+gain 16
+end
+
+.layer layer_4380
+notedv PITCH_BF3, 0x160, 100
+end
+
+.channel enemy_moblin_walk
+instr FONT01_INSTR_SMASH
+env envelope_68EC
+ldlayer 0, layer_438E
+end
+
+.layer layer_438E
+portamento 0x81, 28, 64
+notedv PITCH_GF2, 0xD, 76
+end
+
+.channel enemy_moblin_dash
+instr FONT01_INSTR_SMASH
+env envelope_68EC
+ldlayer 0, layer_439F
+end
+
+.layer layer_439F
+portamento 0x81, 32, 64
+notedv PITCH_BF2, 0x1D, 100
+end
+
+.channel enemy_moblin_slide
+ldlayer 0, layer_43AE
+ldlayer 1, layer_43B0
+end
+
+.layer layer_43AE
+transpose -5
+
+.layer layer_43B0
+instr FONT01_INSTR_TEKTITE_ROTATE
+notedv PITCH_C2, 0x78, 100
+end
+
+.channel enemy_octorok_jump
+instr FONT01_INSTR_WATER_SPLASH_L
+ldlayer 0, layer_43BC
+end
+
+.layer layer_43BC
+portamento 0x81, 40, 100
+notedv PITCH_AF4, 0x64, 80
+end
+
+.channel enemy_octorok_dive
+instr FONT01_INSTR_WATER_SPLASH_L
+ldlayer 0, layer_43CA
+end
+
+.layer layer_43CA
+portamento 0x81, 38, 100
+notedv PITCH_E3, 0x30, 100
+end
+
+.channel enemy_octorok_bubble
+ldlayer 0, layer_43D6
+end
+
+.layer layer_43D6
+instr FONT01_INSTR_STEP_WATER
+notedv PITCH_B1, 0x66, 100
+end
+
+.channel enemy_octorok_float
+instr FONT01_INSTR_STEP_WATER
+ldlayer 0, layer_43E2
+end
+
+.layer layer_43E2
+portamento 0x81, 23, 100
+notedv PITCH_BF2, 0x30, 68
+end
+
+.channel enemy_tektite_land_water1
+instr FONT01_INSTR_WATER_SPLASH_L
+ldlayer 0, layer_43F0
+end
+
+.layer layer_43F0
+portamento 0x81, 47, 100
+notedv PITCH_DF4, 0x50, 80
+end
+
+.channel enemy_octorok_rock_break
+ldlayer 0, layer_43FC
+end
+
+.layer layer_43FC
+instr FONT01_INSTR_EXPLOSION_LAVA
+env envelope_68EC, 251
+notedv PITCH_A2, 0x2C, 100
+end
+
+.channel enemy_bubble_dash
+instr FONT01_INSTR_POT_BREAK
+ldlayer 0, layer_440C
+end
+
+.layer layer_440C
+portamento 0x81, 8, 255
+notedv PITCH_C2, 0x6, 70
+portamento 0x81, 14, 255
+notedv PITCH_A1, 0x8, 70
+end
+
+.channel enemy_bubble_cry
+ldlayer 0, layer_4423
+vibfreq 96
+vibdepth 128
+end
+
+.layer layer_4423
+instr FONT01_INSTR_PHANTOM_LAUGH_0
+notedv PITCH_E4, 0x54, 100
+end
+
+.channel enemy_bubble_flame_appear
+instr FONT01_INSTR_DODONGO_ROAR
+env envelope_6A0C
+ldlayer 0, layer_443A
+vibfreqgrad 70, 110, 18
+vibdepthgrad 20, 80, 10
+end
+
+.layer layer_443A
+portamento 0x81, 19, 255
+notedv PITCH_AF2, 0x46, 100
+end
+
+.channel enemy_bubble_flame_vanish
+instr FONT01_INSTR_DODONGO_ROAR
+env envelope_6A0C
+ldlayer 0, layer_4453
+vibfreqgrad 70, 110, 18
+vibdepthgrad 20, 80, 10
+end
+
+.layer layer_4453
+portamento 0x81, 23, 255
+notedv PITCH_E2, 0x46, 100
+end
+
+.channel enemy_moblin_attack_shout
+instr FONT01_INSTR_LIZALFOS
+ldlayer 0, layer_4463
+gain 16
+end
+
+.layer layer_4463
+portamento 0x81, 17, 255
+notedv PITCH_A2, 0x96, 100
+end
+
+.channel enemy_moblin_grunt
+instr FONT01_INSTR_MOBLIN_GROWL
+ldlayer 0, layer_4474
+gain 16
+end
+
+.layer layer_4474
+portamento 0x81, 21, 255
+notedv PITCH_DF2, 0x44, 100
+end
+
+.channel enemy_moblin_spear_relax
+instr FONT01_INSTR_GULP_SPEAR
+ldlayer 0, layer_4482
+end
+
+.layer layer_4482
+transpose 42
+notedv PITCH_F4, 0xA, 100
+end
+
+.channel enemy_moblin_spear_point
+instr FONT01_INSTR_GULP_SPEAR
+ldlayer 0, layer_4490
+gain 20
+end
+
+.layer layer_4490
+transpose 44
+notedv PITCH_B3, 0x1D, 100
+end
+
+.channel enemy_moblin_club_strike
+instr FONT01_INSTR_GERUDO_ATTACK
+ldlayer 0, layer_449C
+end
+
+.layer layer_449C
+portamento 0x81, 25, 255
+notedv PITCH_F2, 0x78, 100
+end
+
+.channel enemy_moblin_club_lift
+instr FONT01_INSTR_GERUDO_ATTACK
+ldlayer 0, layer_44AA
+end
+
+.layer layer_44AA
+portamento 0x81, 16, 255
+notedv PITCH_B2, 0x78, 100
+end
+
+.channel enemy_moblin_die
+ldlayer 0, layer_44B9
+ldlayer 1, layer_4829
+end
+
+.layer layer_44B9
+instr FONT01_INSTR_LIZALFOS
+legato
+portamento 0x85, 23, 200
+notedv PITCH_C3, 0x1E, 100
+notedv PITCH_DF2, 0x3C, 100
+end
+
+.channel enemy_boss_volvagia_rock
+instr FONT01_INSTR_EXPLOSION_LAVA
+ldlayer 0, layer_44D7
+gain 20
+rand 4
+stseq 107, layer_44D7
+releaserate 232
+end
+
+.layer layer_44D7
+notedv PITCH_F4, 0x32, 100
+end
+
+.channel enemy_boss_volvagia_roar
+ldlayer 0, layer_44EB
+ldlayer 1, layer_44E4
+gain 20
+end
+
+.layer layer_44E4
+instr FONT01_INSTR_THUNDER_HURT
+notedv PITCH_D4, 0xA8, 100
+end
+
+.layer layer_44EB
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x81, 43, 255
+notedv PITCH_GF4, 0xA, 100
+portamento 0x81, 45, 255
+notedv PITCH_A4, 0xA8, 100
+end
+
+.channel enemy_boss_ganon_roar
+ldlayer 0, layer_4508
+ldlayer 1, layer_450F
+ldlayer 2, layer_4513
+end
+
+.layer layer_4508
+instr FONT01_INSTR_MONSTER_ROAR
+notedv PITCH_E4, 0xB4, 100
+end
+
+.layer layer_450F
+transpose -2
+rjump layer_44EB
+
+.layer layer_4513
+transpose 6
+rjump layer_44E4
+
+.channel enemy_volvagia_fall
+ldlayer 0, layer_4532
+ldlayer 1, layer_4524
+gain 20
+vibfreq 120
+vibdepth 64
+end
+
+.layer layer_4524
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x85, 39, 255
+notedv PITCH_F4, 0x14, 80
+notedv PITCH_C3, 0x6E, 80
+end
+
+.layer layer_4532
+instr FONT01_INSTR_THUNDER_HURT
+legato
+portamento 0x85, 39, 255
+notedv PITCH_A4, 0x14, 100
+notedv PITCH_C2, 0xC8, 100
+end
+
+.channel enemy_volvagia_paralyzed
+instr FONT01_INSTR_DINO_ROAR
+gain 20
+ldlayer 0, layer_4549
+end
+
+.layer layer_4549
+legato
+portamento 0x85, 19, 255
+notedv PITCH_GF2, 0x1E, 100
+notedv PITCH_B1, 0x1E, 100
+end
+
+.channel enemy_boss_volvagia_cry
+ldlayer 0, layer_4564
+ldlayer 1, layer_455E
+gain 20
+end
+
+.layer layer_455E
+instr FONT01_INSTR_THUNDER_HURT
+notedv PITCH_AF4, 0x78, 100
+end
+
+.layer layer_4564
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x81, 49, 255
+notedv PITCH_C5, 0xA, 100
+portamento 0x81, 51, 255
+notedv PITCH_EF5, 0x78, 100
+end
+
+.channel enemy_boss_ganon_hurt
+ldlayer 0, layer_4580
+ldlayer 1, layer_4564
+ldlayer 2, layer_4584
+end
+
+.layer layer_4580
+transpose -6
+rjump layer_4564
+
+.layer layer_4584
+instr FONT01_INSTR_MONSTER_ROAR
+legato
+portamento 0x85, 40, 200
+notedv PITCH_AF4, 0x10, 100
+notedv PITCH_D3, 0xB4, 100
+end
+
+.channel enemy_boss_volvagia_hole
+ldlayer 0, layer_45A0
+ldlayer 1, layer_45AC
+gain 20
+vibfreq 10
+vibdepth 20
+end
+
+.layer layer_45A0
+instr FONT01_INSTR_EXPLOSION_LAVA
+env envelope_68B4, 220
+.layer layer_45A6
+notedv PITCH_GF2, 0x118, 100
+rjump layer_45A6
+
+.layer layer_45AC
+instr 2
+.layer layer_45AE
+notedv PITCH_B0, 30000, 100
+rjump layer_45AE
+
+.channel enemy_boss_volvagia_swipe
+instr FONT01_INSTR_GERUDO_ATTACK
+ldlayer 0, layer_45BA
+end
+
+.layer layer_45BA
+portamento 0x81, 28, 255
+notedv PITCH_C4, 0x40, 100
+end
+
+.channel enemy_redead_moan
+instr FONT01_INSTR_GORON_YAWN
+ldlayer 0, layer_45CB
+ldlayer 1, layer_45CD
+end
+
+.layer layer_45CB
+ldelay 0x18
+
+.layer layer_45CD
+notedv PITCH_E3, 0x170, 80
+end
+
+.channel enemy_redead_scream
+ldlayer 0, layer_45D9
+ldlayer 1, layer_45DF
+end
+
+.layer layer_45D9
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_REDEAD_SCREAM, 0x0, 100
+end
+
+.layer layer_45DF
+instr FONT01_INSTR_DINO_ROAR
+portamento 0x81, 30, 255
+notedv PITCH_BF3, 0x2E, 100
+end
+
+.channel enemy_redead_hurt
+instr FONT01_INSTR_GORON_YAWN
+ldlayer 0, layer_45F5
+ldlayer 1, layer_45F7
+ldlayer 2, layer_4829
+end
+
+.layer layer_45F5
+ldelay 0x18
+
+.layer layer_45F7
+portamento 0x81, 34, 255
+notedv PITCH_E2, 0x44, 100
+end
+
+.channel enemy_redead_die
+instr FONT01_INSTR_GORON_YAWN
+ldlayer 0, layer_460B
+ldlayer 1, layer_460D
+ldlayer 2, layer_4829
+end
+
+.layer layer_460B
+ldelay 0x18
+
+.layer layer_460D
+legato
+portamento 0x85, 30, 255
+notedv PITCH_F3, 0x1E, 100
+notedv PITCH_EF2, 0x84, 100
+end
+
+.channel enemy_poe_laugh
+instr FONT01_INSTR_PHANTOM_LAUGH_1
+gain 20
+ldlayer 0, layer_4625
+ldlayer 1, layer_4627
+end
+
+.layer layer_4625
+ldelay 0x16
+
+.layer layer_4627
+notedv PITCH_BF5, 0x62, 100
+end
+
+.channel enemy_poe_sister_attack
+instr FONT01_INSTR_GUNSHOT
+env envelope_686C
+ldlayer 0, layer_4634
+end
+
+.layer layer_4634
+portamento 0x81, 33, 200
+notedv PITCH_GF4, 0x22, 100
+end
+
+.channel enemy_redead_attack
+ldlayer 0, layer_4643
+ldlayer 1, layer_4651
+end
+
+.layer layer_4643
+instr FONT01_INSTR_GORON_YAWN
+env envelope_68EC, 250
+portamento 0x81, 30, 255
+notedv PITCH_B2, 0x30, 100
+end
+
+.layer layer_4651
+instr FONT01_INSTR_SMASH
+env envelope_692C, 250
+portamento 0x81, 17, 50
+notedv PITCH_D1, 0x1E, 100
+end
+
+.channel enemy_poe_sister_laugh
+instr FONT01_INSTR_PHANTOM_LAUGH_1
+ldlayer 0, layer_466B
+ldlayer 1, layer_466D
+ldlayer 2, layer_466F
+end
+
+.layer layer_466B
+ldelay 0x16
+
+.layer layer_466D
+ldelay 0x16
+
+.layer layer_466F
+notedv PITCH_GF5, 0x72, 100
+end
+
+.channel enemy_poe_sister_cry
+instr FONT01_INSTR_POE_DISAPPEAR
+ldlayer 0, layer_4679
+end
+
+.layer layer_4679
+portamento 0x81, 53, 120
+notedv PITCH_G4, 0x44, 100
+end
+
+.channel enemy_boss_morpha_rise
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_468B
+vibfreq 20
+vibdepth 36
+end
+
+.layer layer_468B
+env envelope_6A4C, 220
+.layer layer_468F
+notedv PITCH_A1, 0xFA, 100
+rjump layer_468F
+
+.channel enemy_boss_morpha_attack
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_469F
+vibfreq 127
+vibdepth 84
+end
+
+.layer layer_469F
+env envelope_6A2C, 220
+portamento 0x81, 12, 120
+.layer layer_46A7
+notedv PITCH_A3, 0xD0, 100
+rjump layer_46A7
+
+.channel enemy_boss_morpha_toss
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_46B7
+vibfreq 20
+vibdepth 36
+end
+
+.layer layer_46B7
+env envelope_69BC, 235
+legato
+portamento 0x85, 0, 255
+notedv PITCH_A2, 0x2A, 100
+notedv PITCH_A0, 0x52, 100
+end
+
+.channel enemy_boss_morpha_grab
+instr FONT01_INSTR_PHANTOM_MOAN
+ldlayer 0, layer_46CF
+gain 16
+end
+
+.layer layer_46CF
+portamento 0x81, 30, 255
+notedv PITCH_C3, 0x72, 100
+end
+
+.channel enemy_octorok_death_gasp
+instr FONT01_INSTR_LIZALFOS
+env envelope_68FC
+ldlayer 0, layer_46E0
+end
+
+.layer layer_46E0
+portamento 0x81, 17, 255
+notedv PITCH_BF2, 0x8, 100
+portamento 0x81, 26, 255
+notedv PITCH_EF1, 0xC, 100
+end
+
+.channel enemy_octorok_die
+instr FONT01_INSTR_LIZALFOS
+ldlayer 0, layer_46FC
+ldlayer 1, layer_4829
+vibfreq 100
+vibdepth 100
+end
+
+.layer layer_46FC
+portamento 0x81, 38, 255
+notedv PITCH_G3, 0x84, 100
+end
+
+.channel enemy_boss_morpha_demo_move
+instr FONT01_INSTR_WATER_BUBBLES
+ldlayer 0, layer_470D
+panweight 0
+end
+
+.layer layer_470D
+legato
+portamento 0x85, 23, 255
+.layer layer_4712
+notedv PITCH_F2, 0x2C, 100
+notedv PITCH_AF2, 0x2C, 100
+rjump layer_4712
+
+.channel enemy_boss_morpha_demo_bubble
+instr FONT01_INSTR_WATER_BUBBLES
+env envelope_6A1C
+ldlayer 0, layer_472A
+ldlayer 1, layer_472C
+panweight 0
+gain 20
+end
+
+.layer layer_472A
+ldelay 0x8
+
+.layer layer_472C
+portamento 0x81, 31, 255
+notedv PITCH_DF3, 0x74, 100
+end
+
+.channel enemy_boss_morpha_caught
+ldlayer 0, layer_473B
+ldlayer 1, layer_4742
+end
+
+.layer layer_473B
+instr FONT01_INSTR_WATER_SPLASH_L
+notedv PITCH_D4, 0x86, 100
+end
+
+.layer layer_4742
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x81, 36, 100
+notedv PITCH_B4, 0x10, 80
+portamento 0x81, 41, 255
+notedv PITCH_D3, 0x6, 80
+end
+
+.channel enemy_boss_morpha_die
+ldlayer 0, layer_4781
+ldlayer 1, layer_479D
+vibdepth 144
+vibfreq 196
+ldi 56
+stio 6
+.channel chan_4761
+ldio 6
+stseq 0, layer_4788+1
+stseq 0, layer_478B+1
+stseq 0, layer_4794+1
+stseq 0, layer_4797+1
+sub 1
+stio 6
+sub 4
+rbeqz chan_4780
+ldi 6
+call delay_varyingvol
+rjump chan_4761
+.channel chan_4780
+end
+
+.layer layer_4781
+instr FONT01_INSTR_DINO_ROAR
+.layer layer_4783
+legato
+portamento 0x85, 37, 255
+.layer layer_4788
+notedv PITCH_EF4, 0x1E, 100
+.layer layer_478B
+notedv PITCH_G3, 0x1E, 100
+nolegato
+legato
+portamento 0x85, 34, 255
+.layer layer_4794
+notedv PITCH_BF4, 0x1E, 100
+.layer layer_4797
+notedv PITCH_BF3, 0x1E, 100
+nolegato
+rjump layer_4783
+
+.layer layer_479D
+instr FONT01_INSTR_GORON_YAWN
+portamento 0x85, 35, 255
+notedv PITCH_DF4, 0xE8, 100
+end
+
+.channel enemy_boss_morpha_water_spin
+instr FONT01_INSTR_WATER_BUBBLES
+ldlayer 0, layer_47AE
+end
+
+.layer layer_47AE
+legato
+portamento 0x85, 25, 128
+.layer layer_47B3
+notedv PITCH_EF5, 0xC, 100
+notedv PITCH_BF2, 0xC, 100
+rjump layer_47B3
+
+.channel enemy_boss_morpha_water_move
+instr FONT01_INSTR_WATER_BUBBLES
+env envelope_699C
+ldlayer 0, layer_47C9
+ldlayer 1, layer_47CB
+gain 20
+end
+
+.layer layer_47C9
+ldelay 0x8
+
+.layer layer_47CB
+portamento 0x81, 31, 255
+notedv PITCH_B2, 0x60, 100
+end
+
+.channel enemy_deadhand_bite
+ldlayer 0, layer_47DC
+ldlayer 1, layer_47E2
+gain 22
+end
+
+.layer layer_47DC
+instr FONT01_INSTR_PHANTOM_GROWL
+notedv PITCH_C4, 0x56, 100
+end
+
+.layer layer_47E2
+instr FONT01_INSTR_EGG_CRACK
+portamento 0x81, 11, 200
+notedv PITCH_C2, 0x29, 100
+end
+
+.channel enemy_deadhand_move
+ldlayer 0, layer_47F2
+gain 22
+end
+
+.layer layer_47F2
+instr FONT01_INSTR_EGG_CRACK
+portamento 0x81, 9, 200
+notedv PITCH_BF1, 0x29, 100
+end
+
+.channel enemy_goron_wake
+ldlayer 0, layer_4800
+end
+
+.layer layer_4800
+instr FONT01_INSTR_GORON
+notedv PITCH_GF3, 0x20, 100
+end
+
+.channel enemy_goron_sit
+ldlayer 0, layer_480A
+end
+
+.layer layer_480A
+instr FONT01_INSTR_GORON
+transpose 48
+notedv PITCH_BF3, 0x84, 100
+end
+
+.channel enemy_deadhand_grabbed
+gain 16
+ldlayer 0, layer_481C
+ldlayer 1, layer_5095
+end
+
+.layer layer_481C
+instr FONT01_INSTR_PHANTOM_GROWL
+portamento 0x81, 35, 255
+notedv PITCH_E3, 0x30, 100
+end
+
+.channel enemy_boss_ganondorf_struck
+ldlayer 0, layer_4829
+# @bug missing end. This bug turns out to be harmless in practice.
+
+.layer layer_4829
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_ENEMY_HURT, 0x0, 100
+end
+
+.channel chan_unused_482F
+ldlayer 0, layer_4833
+end
+
+.layer layer_4833
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_GANONDORF_LAUGH_0, 0x0, 100
+end
+
+.channel enemy_big_octo_paralyzed
+ldlayer 0, layer_4846
+ldlayer 1, layer_4850
+gain 16
+vibfreq 100
+vibdepth 100
+end
+
+.layer layer_4846
+instr FONT01_INSTR_LIZALFOS
+portamento 0x81, 15, 255
+notedv PITCH_AF1, 0x54, 100
+end
+
+.layer layer_4850
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 24, 100
+notedv PITCH_D3, 0x1E, 100
+notedv PITCH_A2, 0x2E, 100
+end
+
+.channel enemy_big_octo_walk
+instr FONT01_INSTR_WATER_SPLASH_L
+ldlayer 0, layer_4870
+.channel chan_4863
+rand 4
+stseq 96, layer_4870
+ldi 18
+call delay_varyingvol
+rjump chan_4863
+
+.layer layer_4870
+notedv PITCH_F3, 0x12, 100
+rjump layer_4870
+
+.channel enemy_big_octo_grunt
+instr FONT01_INSTR_GORON
+ldlayer 0, layer_487F
+gain 18
+releaserate 249
+end
+
+.layer layer_487F
+notedv PITCH_DF3, 0x8, 100
+notedv PITCH_BF2, 0x1E, 100
+end
+
+.channel enemy_big_octo_hurt
+ldlayer 0, layer_4896
+ldlayer 1, layer_48A4
+ldlayer 2, layer_4829
+gain 16
+vibfreq 100
+vibdepth 100
+end
+
+.layer layer_4896
+instr FONT01_INSTR_LIZALFOS
+legato
+portamento 0x85, 25, 255
+notedv PITCH_DF3, 0x18, 100
+notedv PITCH_GF1, 0x1C, 100
+end
+
+.layer layer_48A4
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 30, 100
+notedv PITCH_AF3, 0xC, 100
+notedv PITCH_EF3, 0x12, 100
+end
+
+.channel enemy_big_octo_stop
+instr FONT01_INSTR_WATER_SPLASH_L
+ldlayer 0, layer_48B8
+end
+
+.layer layer_48B8
+portamento 0x81, 47, 100
+notedv PITCH_DF4, 0x12, 100
+portamento 0x81, 47, 100
+notedv PITCH_DF4, 0x12, 100
+portamento 0x81, 47, 100
+notedv PITCH_DF4, 0x12, 100
+portamento 0x81, 47, 100
+notedv PITCH_DF4, 0x50, 100
+end
+
+.channel enemy_big_octo_die
+ldlayer 0, layer_48E5
+ldlayer 1, layer_48A4
+ldlayer 2, layer_4829
+gain 16
+vibfreq 100
+vibdepth 100
+end
+
+.layer layer_48E5
+instr FONT01_INSTR_LIZALFOS
+portamento 0x85, 27, 255
+notedv PITCH_AF3, 0x18, 100
+notedv PITCH_AF1, 0x66, 100
+end
+
+.channel enemy_big_octo_die2
+ldlayer 0, layer_48FC
+gain 18
+vibfreq 100
+vibdepth 100
+end
+
+.layer layer_48FC
+instr FONT01_INSTR_PHANTOM_WAIL
+portamento 0x85, 42, 100
+notedv PITCH_EF3, 0x70, 100
+end
+
+.channel enemy_boss_gohma_paralyzed
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_4913
+ldlayer 1, layer_4920
+vibfreq 84
+vibdepth 100
+end
+
+.layer layer_4913
+notedv PITCH_AF3, 0x110, 100
+env envelope_68AC, 240
+ldelay 0x88
+rjump layer_4913
+
+.layer layer_4920
+env envelope_68AC, 240
+ldelay 0xCC
+rjump layer_4913
+
+.channel enemy_final_hit
+instr FONT01_INSTR_ELECTRIC_ATTACK
+ldlayer 0, layer_4931
+gain 20
+end
+
+.layer layer_4931
+transpose 6
+portamento 0x81, 48, 54
+notedv PITCH_BF5, 0x2C, 100
+end
+
+.channel enemy_boss_morpha_die_cry
+ldlayer 0, layer_4959
+ldlayer 1, layer_4949
+ldlayer 2, layer_494B
+vibfreq 20
+vibdepth 50
+end
+
+.layer layer_4949
+transpose 1
+
+.layer layer_494B
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 39, 20
+notedv PITCH_E4, 0x10, 100
+notedv PITCH_B3, 0x56, 100
+end
+
+.layer layer_4959
+instr FONT01_INSTR_DINO_ROAR
+portamento 0x85, 38, 255
+notedv PITCH_E4, 0x14, 80
+notedv PITCH_B2, 0x56, 80
+end
+
+.channel enemy_shop_scrub_cry
+ldlayer 0, layer_496A
+end
+
+.layer layer_496A
+instr FONT01_INSTR_SCRUB_DEATH
+portamento 0x81, 43, 255
+notedv PITCH_EF5, 0x8, 80
+portamento 0x81, 52, 255
+notedv PITCH_AF4, 0x8, 80
+end
+
+.channel enemy_skullwall_rotate
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_4984
+ldlayer 1, layer_498C
+end
+
+.layer layer_4984
+portamento 0x81, 31, 100
+notedv PITCH_C3, 0x32, 64
+end
+
+.layer layer_498C
+ldelay 0x5
+portamento 0x81, 33, 100
+notedv PITCH_D3, 0x32, 64
+end
+
+.channel enemy_skullwall_dash
+instr FONT01_INSTR_GRASS_RUSTLE
+ldlayer 0, layer_499F
+ldlayer 1, layer_49A7
+end
+
+.layer layer_499F
+portamento 0x81, 27, 100
+notedv PITCH_E3, 0x32, 64
+end
+
+.layer layer_49A7
+ldelay 0x5
+portamento 0x81, 29, 100
+notedv PITCH_GF3, 0x32, 64
+end
+
+.channel enemy_boss_twinrova_appear
+instr FONT01_INSTR_GANONDORF_CHARGE
+env envelope_699C
+ldlayer 0, layer_49C0
+gain 18
+vibfreq 128
+vibdepth 52
+end
+
+.layer layer_49C0
+portamento 0x81, 31, 255
+notedv PITCH_B2, 0x64, 100
+end
+
+.channel enemy_boss_twinrova_transform
+ldlayer 0, layer_49D5
+ldlayer 1, layer_49DB
+gain 20
+vibfreq 240
+vibdepth 240
+end
+
+.layer layer_49D5
+instr FONT01_INSTR_GUNSHOT
+notedv PITCH_D3, 0x64, 100
+end
+
+.layer layer_49DB
+instr FONT01_INSTR_DINO_INHALE
+portamento 0x81, 7, 255
+notedv PITCH_BF3, 0xE6, 84
+end
+
+.channel enemy_boss_twinrova_fire_charge
+instr FONT01_INSTR_DINO_INHALE
+ldlayer 0, layer_49F0
+vibfreq 127
+vibdepth 84
+end
+
+.layer layer_49F0
+legato
+portamento 0x85, 15, 120
+notedv PITCH_C4, 0xC8, 100
+.layer layer_49F9
+notedv PITCH_C4, 30000, 100
+rjump layer_49F9
+
+.channel enemy_boss_twinrova_fire_hit
+ldlayer 0, layer_4A09
+ldlayer 1, layer_4A0B
+ldlayer 2, layer_4A17
+end
+
+.layer layer_4A09
+transpose -12
+
+.layer layer_4A0B
+instr 2
+env envelope_6A7C, 200
+.layer layer_4A11
+notedv PITCH_G3, 30000, 100
+rjump layer_4A11
+
+.layer layer_4A17
+instr FONT01_INSTR_THUNDERBURST
+env envelope_6A5C, 200
+notedv PITCH_GF2, 0x180, 100
+end
+
+.channel enemy_boss_twinrova_ice_beam
+instr FONT01_INSTR_WIND
+ldlayer 0, layer_4A28
+end
+
+.layer layer_4A28
+legato
+portamento 0x85, 10, 102
+transpose 10
+notedv PITCH_F5, 0x28, 100
+transpose 0
+.layer layer_4A34
+notedv PITCH_F5, 0x64, 100
+rjump layer_4A34
+
+.channel enemy_boss_twinrova_fire_reflected
+ldlayer 0, layer_4A44
+ldlayer 1, layer_4B32
+vibfreq 128
+vibdepth 96
+end
+
+.layer layer_4A44
+instr FONT01_INSTR_WIND
+transpose 12
+legato
+rjump layer_4A34
+end
+
+.channel enemy_boss_twinrova_ice_charge
+instr FONT01_INSTR_WIND
+ldlayer 0, layer_4A56
+vibfreq 127
+vibdepth 84
+end
+
+.layer layer_4A56
+legato
+portamento 0x85, 35, 120
+notedv PITCH_AF5, 0xC8, 100
+.layer layer_4A5F
+notedv PITCH_AF5, 30000, 100
+rjump layer_4A5F
+
+.channel enemy_ganondorf_charge_major
+instr FONT01_INSTR_WIND
+ldlayer 0, layer_4A94
+ldlayer 1, layer_4A96
+ldlayer 2, layer_4A9E
+vibfreq 175
+vibdepth 196
+ldi 36
+stio 6
+ldi 191
+call delay_varyingvol
+.channel chan_4A7C
+ldio 6
+stseq 0, layer_4AAA+1
+stseq 0, layer_4AAD+1
+sub 1
+stio 6
+sub 4
+rbeqz chan_4A93
+ldi 8
+call delay_varyingvol
+rjump chan_4A7C
+.channel chan_4A93
+end
+
+.layer layer_4A94
+instr FONT01_INSTR_DINO_INHALE
+
+.layer layer_4A96
+env envelope_68B4, 249
+transpose -4
+rjump layer_4A56
+
+.layer layer_4A9E
+instr FONT01_INSTR_DODONGO_ROAR
+ldelay 0x120
+loop 10
+legato
+portamento 0x85, 27, 255
+.layer layer_4AAA
+notedv PITCH_F3, 0x1E, 100
+.layer layer_4AAD
+notedv PITCH_A2, 0x1E, 100
+nolegato
+loopend
+end
+
+.channel enemy_boss_twinrova_cast
+instr 2
+ldlayer 0, layer_4ABF
+gain 20
+vibfreq 144
+vibdepth 240
+end
+
+.layer layer_4ABF
+notedv PITCH_AF2, 0x30, 100
+end
+
+.channel enemy_darunia_chest_pound
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_4AC9
+end
+
+.layer layer_4AC9
+env envelope_68DC, 250
+.layer layer_4ACD
+portamento 0x81, 26, 64
+notedv PITCH_E2, 0xC, 100
+rjump layer_4ACD
+
+.channel enemy_darunia_head_pat
+instr FONT01_INSTR_SMASH
+env envelope_692C
+ldlayer 0, layer_4ADF
+end
+
+.layer layer_4ADF
+portamento 0x81, 32, 130
+notedv PITCH_GF2, 0x1E, 100
+end
+
+.channel enemy_boss_twinrova_hurt_cry_old
+ldlayer 0, layer_4261
+ldlayer 1, layer_4AEE
+end
+
+.layer layer_4AEE
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_WITCH_HURT, 0x0, 100
+end
+
+.channel enemy_boss_twinrova_hit_beam_young
+ldlayer 0, layer_4261
+ldlayer 1, layer_4AFB
+end
+
+.layer layer_4AFB
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_WITCH_SHOCK, 0x0, 100
+end
+
+.channel enemy_boss_twinrova_die_young
+ldlayer 0, layer_4B0B
+ldlayer 1, layer_4B12
+ldlayer 2, layer_4829
+end
+
+.layer layer_4B0B
+instr FONT01_INSTR_THUNDERBURST
+notedv PITCH_AF4, 0x110, 100
+end
+
+.layer layer_4B12
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_TWINROVA_SCREAM, 0x0, 100
+end
+
+.channel enemy_boss_twinrova_spirit_fly
+instr FONT01_INSTR_DODONGO_ROAR
+ldlayer 0, layer_4B22
+vibfreq 112
+vibdepth 128
+end
+
+.layer layer_4B22
+env envelope_69DC, 240
+legato
+portamento 0x85, 3, 255
+notedv PITCH_F2, 0x1A, 100
+notedv PITCH_A0, 0x20, 100
+end
+
+.layer layer_4B32
+instr FONTANY_INSTR_8PULSE
+env envelope_6A7C, 249
+.layer layer_4B38
+notedv PITCH_GF3, 30000, 100
+rjump layer_4B38
+
+.channel enemy_boss_twinrova_charge
+ldlayer 0, layer_521B
+ldlayer 1, layer_5219
+vibfreq 96
+vibdepth 240
+end
+
+.channel enemy_knuckle_walk
+ldlayer 0, layer_4B59
+ldlayer 1, layer_4B50
+end
+
+.layer layer_4B50
+instr FONT01_INSTR_SLIDE_BOOTS
+notedv PITCH_BF1, 0x8, 64
+notedv PITCH_G2, 0x14, 64
+end
+
+.layer layer_4B59
+instr FONT01_INSTR_GUNSHOT
+env envelope_68DC, 249
+portamento 0x81, 26, 96
+notedv PITCH_DF2, 0x1E, 100
+end
+
+.channel enemy_knuckle_attack
+ldlayer 0, layer_4B71
+ldlayer 1, layer_4B7B
+ldlayer 2, layer_4B87
+end
+
+.layer layer_4B71
+instr FONT01_INSTR_GERUDO_ATTACK
+portamento 0x81, 27, 255
+notedv PITCH_A2, 0x78, 100
+end
+
+.layer layer_4B7B
+instr FONT01_INSTR_SLIDE_BOOTS
+notedv PITCH_BF1, 0x4, 64
+notedv PITCH_G2, 0x6, 64
+notedv PITCH_DF3, 0x14, 64
+end
+
+.layer layer_4B87
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_KNUCKLE_ATTACK, 0x0, 100
+end
+
+.channel enemy_bubble_die
+ldlayer 0, layer_4B9B
+ldlayer 2, layer_4BA9
+.channel chan_4B93
+ldlayer 1, layer_4829
+vibfreq 128
+vibdepth 48
+end
+
+.layer layer_4B9B
+instr FONT01_INSTR_PHANTOM_MOAN
+legato
+portamento 0x85, 46, 200
+notedv PITCH_C5, 0x20, 100
+notedv PITCH_E4, 0x6C, 100
+end
+
+.layer layer_4BA9
+instr FONT01_INSTR_POT_BREAK
+notedv PITCH_G3, 0x5, 100
+notedv PITCH_G3, 0x5, 100
+end
+
+.channel enemy_bubble_hurt
+ldlayer 0, layer_4BB7
+rjump chan_4B93
+
+.layer layer_4BB7
+transpose 5
+rjump layer_4B9B
+end
+
+.channel enemy_bubble_attack
+ldlayer 0, layer_4BC0
+end
+
+.layer layer_4BC0
+instr FONT01_INSTR_STALFOS_ATTACK
+legato
+portamento 0x85, 30, 30
+notedv PITCH_AF4, 0x8, 100
+notedv PITCH_GF4, 0x12, 100
+end
+
+.channel enemy_poe_sister_die
+ldlayer 3, layer_4829
+.channel chan_4BD1
+ldlayer 0, layer_4BDB
+ldlayer 1, layer_4BDD
+ldlayer 2, layer_4BF3
+end
+
+.layer layer_4BDB
+ldelay 0x8
+
+.layer layer_4BDD
+instr FONT01_INSTR_PHANTOM_LAUGH_1
+transpose 12
+portamento 0x81, 48, 100
+notedv PITCH_E5, 0x1E, 100
+portamento 0x85, 51, 100
+notedv PITCH_F5, 0x14, 100
+notedv PITCH_B4, 0x1E, 100
+end
+
+.layer layer_4BF3
+instr FONT01_INSTR_PHANTOM_GROWL
+legato
+transpose 48
+portamento 0x85, 47, 200
+notedv PITCH_D5, 0x20, 100
+notedv PITCH_B2, 0x64, 100
+end
+
+.channel enemy_big_poe_get_soul
+rjump chan_4BD1
+
+.channel enemy_knuckle_clank
+ldlayer 0, layer_4B7B
+end
+
+.channel enemy_bari_spin
+instr FONT01_INSTR_GERUDO_ATTACK
+ldlayer 0, layer_4C0F
+end
+
+.layer layer_4C0F
+legato
+portamento 0x85, 19, 200
+notedv PITCH_EF2, 0x18, 100
+notedv PITCH_B2, 0x3C, 100
+end
+
+.channel enemy_larvae_paralyzed
+instr FONT01_INSTR_POE_DISAPPEAR
+ldlayer 0, layer_4C25
+vibfreq 196
+vibdepth 196
+end
+
+.layer layer_4C25
+portamento 0x81, 62, 255
+notedv PITCH_EF3, 0x40, 100
+end
+
+.channel enemy_bari_die
+ldlayer 0, layer_4C34
+ldlayer 1, layer_4829
+end
+
+.layer layer_4C34
+instr FONT01_INSTR_GUAY_HURT
+.layer layer_4C36
+portamento 0x81, 32, 255
+notedv PITCH_C4, 0xA, 100
+portamento 0x81, 34, 255
+notedv PITCH_D4, 0xA, 100
+portamento 0x81, 36, 255
+notedv PITCH_E4, 0xA, 100
+portamento 0x81, 45, 255
+notedv PITCH_A3, 0xE, 100
+end
+
+.channel enemy_bari_split
+ldlayer 0, layer_4C57
+end
+
+.layer layer_4C57
+instr FONT01_INSTR_GULP_SPEAR
+transpose 4
+rjump layer_4C36
+
+.channel enemy_floormaster_attack
+instr FONT01_INSTR_DODONGO_ROAR
+ldlayer 0, layer_4C6A
+env envelope_699C
+vibfreq 112
+vibdepth 96
+end
+
+.layer layer_4C6A
+notedv PITCH_E2, 0x64, 100
+end
+
+.channel enemy_floormaster_mini_walk
+instr FONT01_INSTR_EGG_CRACK
+ldlayer 0, layer_4C74
+end
+
+.layer layer_4C74
+portamento 0x81, 21, 128
+notedv PITCH_A2, 0x8, 100
+end
+
+.channel enemy_floormaster_mini_die
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_4C89
+ldlayer 1, layer_4829
+vibfreq 132
+vibdepth 70
+end
+
+.layer layer_4C89
+legato
+portamento 0x85, 56, 128
+notedv PITCH_BF5, 0x14, 100
+notedv PITCH_D5, 0x2C, 100
+end
+
+.channel enemy_floormaster_mini_grow
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_4CA2
+env envelope_69DC
+vibfreq 62
+vibdepth 96
+end
+
+.layer layer_4CA2
+notedv PITCH_AF3, 0x3C, 80
+rjump layer_4CA2
+
+.channel enemy_floormaster_grow_done
+ldlayer 0, layer_4CAB
+end
+
+.layer layer_4CAB
+instr FONT01_INSTR_EXPLOSION_LAVA
+env envelope_694C, 249
+legato
+portamento 0x85, 7, 150
+notedv PITCH_DF1, 0xA, 100
+notedv PITCH_DF2, 0x16, 100
+end
+
+.channel enemy_floormaster_split
+ldlayer 0, layer_4CC1
+end
+
+.layer layer_4CC1
+transpose 12
+rjump layer_4CAB
+end
+
+.channel enemy_floormaster_mini_grab
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_4CD3
+env envelope_69FC
+vibfreq 80
+vibdepth 64
+end
+
+.layer layer_4CD3
+legato
+portamento 0x85, 6, 255
+notedv PITCH_EF3, 0x2A, 69
+notedv PITCH_G2, 0x40, 69
+rjump layer_4CD3
+
+.channel enemy_floormaster_mini_land
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_4CE6
+end
+
+.layer layer_4CE6
+legato
+env envelope_68FC, 255
+portamento 0x85, 25, 230
+notedv PITCH_EF3, 0x5, 80
+notedv PITCH_BF2, 0x5, 80
+nolegato
+ldelay 0x5
+legato
+env envelope_68FC, 255
+portamento 0x85, 25, 220
+notedv PITCH_EF3, 0x5, 80
+notedv PITCH_BF2, 0xA, 80
+end
+
+.channel enemy_cucco_flap
+instr FONT01_INSTR_OWL_FLAP
+ldlayer 0, layer_4D0E
+end
+
+.layer layer_4D0E
+portamento 0x81, 35, 200
+notedv PITCH_B3, 0x20, 100
+end
+
+.channel enemy_ganondorf_magic_fire
+ldlayer 0, layer_4D23
+ldlayer 1, layer_4A09
+ldlayer 2, layer_4A0B
+ldlayer 3, layer_4A17
+end
+
+.layer layer_4D23
+ldelay 0x7F
+end
+
+.channel enemy_floormaster_slide
+instr FONT01_INSTR_SLIDE_BOOTS
+ldlayer 0, layer_4D2C
+end
+
+.layer layer_4D2C
+transpose 48
+.layer layer_4D2E
+notedv PITCH_C4, 30000, 100
+rjump layer_4D2E
+
+.channel enemy_knuckle_armor_rebound2
+ldlayer 0, layer_4D4D
+ldlayer 1, layer_4D3B
+end
+
+.layer layer_4D3B
+instr FONT01_INSTR_SLIDE_BOOTS
+notedv PITCH_GF1, 0x40, 100
+notedv PITCH_GF1, 0x14, 100
+notedv PITCH_GF1, 0x10, 84
+notedv PITCH_GF1, 0xA, 68
+notedv PITCH_GF1, 0xA, 68
+end
+
+.layer layer_4D4D
+transpose -8
+ldelay 0x4
+rjump layer_4D3B
+
+.channel enemy_knuckle_armor_rebound3
+ldlayer 0, layer_4D3B
+end
+
+.channel enemy_knuckle_armor_rebound1
+ldlayer 0, layer_4D70
+ldlayer 1, layer_4D5E
+end
+
+.layer layer_4D5E
+instr FONT01_INSTR_SLIDE_BOOTS
+notedv PITCH_GF1, 0x8, 100
+notedv PITCH_GF1, 0x40, 100
+notedv PITCH_GF1, 0x20, 100
+notedv PITCH_GF1, 0x30, 84
+notedv PITCH_GF1, 0x40, 68
+end
+
+.layer layer_4D70
+transpose -8
+rjump layer_4D5E
+
+.channel enemy_knuckle_stagger
+ldlayer 0, layer_4D87
+ldlayer 1, layer_4D7B
+end
+
+.layer layer_4D7B
+instr FONT01_INSTR_SLIDE_BOOTS
+notedv PITCH_EF1, 0x6, 100
+notedv PITCH_GF1, 0xE, 100
+notedv PITCH_C2, 0x10, 100
+end
+
+.layer layer_4D87
+transpose -5
+rjump layer_4D7B
+
+.channel enemy_knucle_armor_loss
+ldlayer 0, layer_4D9C
+ldlayer 1, layer_4D92
+end
+
+.layer layer_4D92
+instr FONT01_INSTR_POT_BREAK
+portamento 0x81, 8, 200
+notedv PITCH_BF1, 0x20, 100
+end
+
+.layer layer_4D9C
+instr FONT01_INSTR_SLIDE_BOOTS
+ldelay 0xE
+notedv PITCH_EF1, 0x14, 64
+end
+
+.channel enemy_knuckle_warcry
+ldlayer 0, layer_4DAB
+ldlayer 1, layer_4DBB
+end
+
+.layer layer_4DAB
+instr FONT01_INSTR_SLIDE_BOOTS
+env envelope_695C, 249
+loop 5
+notedv PITCH_C2, 0xA, 100
+notedv PITCH_G1, 0x8, 100
+loopend
+end
+
+.layer layer_4DBB
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_KNUCKLE_CHARGE, 0x0, 100
+end
+
+.channel enemy_knuckle_snap
+ldlayer 0, layer_4DC7
+gain 32
+end
+
+.layer layer_4DC7
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_SNAP, 0x0, 100
+end
+
+.channel enemy_boss_barinade_pulse
+instr FONT01_INSTR_BOULDER
+ldlayer 0, layer_4DDA
+ldlayer 1, layer_4DDC
+vibfreq 40
+vibdepth 96
+end
+
+.layer layer_4DDA
+transpose 6
+
+.layer layer_4DDC
+notedv PITCH_A4, 30000, 100
+rjump layer_4DDC
+
+.channel enemy_boss_barinade_hurt
+ldlayer 0, layer_4E03
+ldlayer 1, layer_4DF3
+ldlayer 2, layer_4DF5
+ldlayer 3, layer_4829
+vibfreq 116
+vibdepth 210
+end
+
+.layer layer_4DF3
+transpose 12
+
+.layer layer_4DF5
+instr FONT01_INSTR_DINO_ROAR
+.layer layer_4DF7
+portamento 0x85, 32, 255
+notedv PITCH_C4, 0x20, 80
+notedv PITCH_B2, 0x90, 80
+end
+
+.layer layer_4E03
+instr FONT01_INSTR_MONSTER_ROAR
+portamento 0x81, 37, 100
+notedv PITCH_GF2, 0xB0, 100
+end
+
+.channel enemy_tentacle_die
+ldlayer 0, layer_4E1F
+ldlayer 1, layer_4DF5
+ldlayer 2, layer_4E77
+ldlayer 3, layer_4829
+vibfreq 80
+vibdepth 48
+end
+
+.layer layer_4E1F
+transpose 4
+rjump layer_4E03
+
+.channel enemy_boss_barinade_weak_hurt
+ldlayer 0, layer_4E3A
+ldlayer 1, layer_4E34
+ldlayer 2, layer_4E36
+ldlayer 3, layer_4829
+vibfreq 164
+vibdepth 162
+end
+
+.layer layer_4E34
+transpose 4
+
+.layer layer_4E36
+instr FONT01_INSTR_DODONGO_ROAR
+rjump layer_4DF7
+
+.layer layer_4E3A
+transpose 2
+rjump layer_4E03
+
+.channel enemy_boss_barinade_die
+ldlayer 0, layer_4E47
+ldlayer 1, layer_4E45
+end
+
+.layer layer_4E45
+transpose 6
+
+.layer layer_4E47
+instr FONT01_INSTR_EXPLOSION_LAVA
+env envelope_694C, 249
+legato
+portamento 0x85, 19, 150
+notedv PITCH_C1, 0xA, 100
+notedv PITCH_B2, 0x14, 100
+end
+
+.channel enemy_boss_twinrova_hurt
+ldlayer 0, layer_4E75
+ldlayer 1, layer_4E77
+ldlayer 2, layer_4E66
+ldlayer 3, layer_4E68
+end
+
+.layer layer_4E66
+transpose 2
+
+.layer layer_4E68
+instr FONT01_INSTR_EXPLOSION_LAVA
+portamento 0x85, 34, 255
+notedv PITCH_F4, 0x14, 100
+notedv PITCH_B2, 0x7F, 100
+end
+
+.layer layer_4E75
+transpose -2
+
+.layer layer_4E77
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 39, 64
+notedv PITCH_F4, 0x12, 100
+notedv PITCH_A3, 0xA8, 100
+end
+
+.channel enemy_boss_barinade_tentacle_break
+ldlayer 0, layer_4E66
+ldlayer 1, layer_4E68
+end
+
+.channel enemy_boss_barinade_bari_attach
+ldlayer 0, layer_4E94
+ldlayer 1, layer_4E9E
+end
+
+.layer layer_4E94
+instr FONT01_INSTR_BABA_LUNGE
+portamento 0x81, 35, 50
+notedv PITCH_AF2, 0x30, 100
+end
+
+.layer layer_4E9E
+instr FONT01_INSTR_GANONDORF_ATTACK_0
+portamento 0x81, 39, 50
+notedv PITCH_DF3, 0x40, 100
+end
+
+.channel enemy_boss_barinade_beam
+instr FONT01_INSTR_THUNDERBURST
+ldlayer 0, layer_4EB7
+ldlayer 1, layer_4EB5
+vibfreq 196
+vibdepth 48
+end
+
+.layer layer_4EB5
+transpose 8
+
+.layer layer_4EB7
+notedv PITCH_A3, 0x1A2, 100
+end
+
+.channel enemy_deadhand_grab
+instr FONT01_INSTR_GERUDO_ATTACK
+ldlayer 0, layer_4EC6
+vibfreq 128
+vibdepth 160
+end
+
+.layer layer_4EC6
+portamento 0x81, 22, 255
+notedv PITCH_DF2, 0x7F, 100
+end
+
+.channel enemy_tentacle_wind_up
+instr FONT01_INSTR_GERUDO_ATTACK
+ldlayer 0, layer_4ED8
+vibfreq 128
+vibdepth 160
+end
+
+.layer layer_4ED8
+portamento 0x81, 16, 255
+notedv PITCH_G2, 0x7F, 100
+end
+
+.channel enemy_shabom_pop
+ldlayer 0, layer_4EF4
+ldlayer 1, layer_4EEA
+ldlayer 2, layer_4EF9
+end
+
+.layer layer_4EEA
+instr FONT01_INSTR_GUNSHOT
+portamento 0x81, 54, 100
+notedv PITCH_B5, 0x60, 100
+end
+
+.layer layer_4EF4
+ldelay 0x2
+rjump layer_4EEA
+end
+
+.layer layer_4EF9
+instr FONT01_INSTR_STEP_WATER
+portamento 0x81, 27, 255
+notedv PITCH_F3, 0x14, 100
+end
+
+.channel enemy_shabom_bounce
+instr FONT01_INSTR_WATER_BUBBLES
+ldlayer 0, layer_4F0C
+env envelope_692C
+end
+
+.layer layer_4F0C
+portamento 0x85, 39, 100
+notedv PITCH_A3, 0x16, 100
+notedv PITCH_B4, 0x16, 100
+end
+
+.channel enemy_stinger_submerge
+instr FONT01_INSTR_WATER_SPLASH_L
+ldlayer 0, layer_4F20
+env envelope_68CC
+end
+
+.layer layer_4F20
+portamento 0x81, 27, 100
+notedv PITCH_F3, 0x34, 100
+end
+
+.channel enemy_stinger_glide
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_4F32
+vibfreq 80
+vibdepth 96
+end
+
+.layer layer_4F32
+env envelope_6A2C, 230
+.layer layer_4F36
+notedv PITCH_E2, 0xD0, 80
+rjump layer_4F36
+
+.channel enemy_stinger_attack
+ldlayer 0, layer_4F44
+vibfreq 240
+vibdepth 160
+end
+
+.layer layer_4F44
+instr FONT01_INSTR_GUAY_HURT
+portamento 0x81, 52, 255
+notedv PITCH_GF5, 0x40, 100
+end
+
+.channel enemy_stinger_cry
+ldlayer 0, layer_4F55
+ldlayer 1, layer_4F57
+end
+
+.layer layer_4F55
+ldelay 0x6
+
+.layer layer_4F57
+instr FONT01_INSTR_GUAY_HURT
+notedv PITCH_GF5, 0x64, 100
+end
+
+.channel enemy_boss_bongo_drum_low
+instr FONT01_INSTR_BONGO_BONGO
+ldlayer 0, layer_4F6A
+ldlayer 1, layer_4F68
+gain 24
+end
+
+.layer layer_4F68
+transpose 2
+
+.layer layer_4F6A
+notedv PITCH_C4, 0x40, 100
+end
+
+.channel enemy_boss_bongo_drum_high
+instr FONT01_INSTR_BONGO_BONGO
+ldlayer 0, layer_4F7B
+ldlayer 1, layer_4F79
+gain 24
+end
+
+.layer layer_4F79
+transpose 2
+
+.layer layer_4F7B
+notedv PITCH_F4, 0x40, 100
+end
+
+.channel enemy_owl_fly
+instr FONT01_INSTR_OWL_FLAP
+ldlayer 0, layer_4F8A
+ldlayer 1, layer_4F88
+end
+
+.layer layer_4F88
+transpose 2
+
+.layer layer_4F8A
+portamento 0x81, 23, 200
+notedv PITCH_B2, 0x2C, 100
+end
+
+.channel enemy_peahat_fly
+instr FONT01_INSTR_SWOOSH
+ldlayer 0, layer_4F98
+end
+
+.layer layer_4F98
+notedv PITCH_E5, 0x6, 100
+notedv PITCH_GF5, 0x6, 100
+notedv PITCH_AF5, 0x6, 100
+notedv PITCH_A5, 0x6, 100
+notedv PITCH_AF5, 0x6, 100
+notedv PITCH_GF5, 0x6, 100
+notedv PITCH_E5, 0x6, 100
+rjump layer_4F98
+
+.channel enemy_peahat_land
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_361B
+end
+
+.channel enemy_peahat_rise
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_4FBB
+end
+
+.layer layer_4FBB
+portamento 0x81, 15, 104
+notedv PITCH_B3, 0x40, 100
+end
+
+.channel enemy_peahat_hurt
+ldlayer 0, layer_4FDE
+ldlayer 1, layer_4FD1
+ldlayer 2, layer_4829
+vibfreq 112
+vibdepth 160
+end
+
+.layer layer_4FD1
+instr FONT01_INSTR_DINO_ROAR
+portamento 0x85, 40, 255
+notedv PITCH_AF4, 0x20, 80
+notedv PITCH_G3, 0x40, 80
+end
+
+.layer layer_4FDE
+instr FONT01_INSTR_MONSTER_ROAR
+portamento 0x81, 41, 100
+notedv PITCH_EF3, 0x60, 100
+end
+
+.channel enemy_boss_twinrova_fly
+instr FONT01_INSTR_DODONGO_ROAR
+ldlayer 0, layer_4FF2
+vibfreq 96
+vibdepth 128
+end
+
+.layer layer_4FF2
+env envelope_6A2C, 230
+.layer layer_4FF6
+notedv PITCH_GF1, 0x70, 100
+rjump layer_4FF6
+
+.channel enemy_boss_twinrova_hover
+ldlayer 0, layer_5008
+ldlayer 1, layer_5006
+vibfreq 16
+vibdepth 128
+end
+
+.layer layer_5006
+transpose 2
+
+.layer layer_5008
+instr FONT01_INSTR_DODONGO_ROAR
+env envelope_6A2C, 230
+.layer layer_500E
+notedv PITCH_C1, 0x70, 100
+rjump layer_500E
+
+.channel enemy_tektite_jump_water
+instr FONT01_INSTR_WATER_SPLASH_L
+ldlayer 0, layer_5019
+end
+
+.layer layer_5019
+portamento 0x81, 35, 100
+notedv PITCH_DF5, 0x38, 80
+end
+
+.channel enemy_tektite_land_water2
+instr FONT01_INSTR_WATER_SPLASH_L
+ldlayer 0, layer_5027
+end
+
+.layer layer_5027
+portamento 0x81, 49, 100
+notedv PITCH_EF4, 0x38, 80
+end
+
+.channel enemy_tektite_turn_water
+instr FONT01_INSTR_STEP_WATER
+ldlayer 0, layer_5035
+end
+
+.layer layer_5035
+portamento 0x81, 16, 100
+notedv PITCH_E2, 0x30, 68
+end
+
+.channel enemy_blob_wave
+instr FONT01_INSTR_DINO_INHALE
+ldlayer 0, layer_5047
+vibfreq 112
+vibdepth 240
+end
+
+.layer layer_5047
+transpose -19
+legato
+portamento 0x85, 0, 255
+notedv PITCH_A2, 0x20, 100
+notedv PITCH_A0, 0x20, 100
+end
+
+.channel enemy_boss_bongo_clap
+ldlayer 0, layer_505C
+ldlayer 1, layer_505E
+end
+
+.layer layer_505C
+transpose -6
+
+.layer layer_505E
+instr FONT01_INSTR_GUNSHOT
+notedv PITCH_D5, 0x30, 100
+end
+
+.channel enemy_boss_bongo_hand_wave
+instr FONT01_INSTR_THUNDERBURST
+ldlayer 0, layer_506E
+vibfreq 128
+vibdepth 224
+end
+
+.layer layer_506E
+notedv PITCH_F3, 0x35, 100
+end
+
+.channel enemy_boss_bongo_hand_attack
+instr FONT01_INSTR_DODONGO_ROAR
+ldlayer 0, layer_5083
+ldlayer 1, layer_5081
+releaserate 220
+vibfreq 112
+vibdepth 96
+end
+
+.layer layer_5081
+transpose 6
+
+.layer layer_5083
+notedv PITCH_E2, 0x90, 100
+rjump layer_5083
+
+.channel enemy_wallmaster_grab
+ldlayer 0, layer_5095
+ldlayer 1, layer_5093
+ldlayer 2, layer_50A3
+end
+
+.layer layer_5093
+transpose 2
+
+.layer layer_5095
+instr FONT01_INSTR_SMASH
+env envelope_696C, 250
+portamento 0x81, 19, 50
+notedv PITCH_E1, 0x20, 100
+end
+
+.layer layer_50A3
+instr FONT01_INSTR_EGG_CRACK
+env envelope_696C, 250
+portamento 0x81, 15, 50
+notedv PITCH_A1, 0x20, 100
+end
+
+.channel enemy_boss_bongo_hand_shake
+instr FONT01_INSTR_OWL_FLAP
+ldlayer 0, layer_50B7
+end
+
+.layer layer_50B7
+portamento 0x85, 21, 200
+notedv PITCH_D3, 0x13, 100
+notedv PITCH_GF2, 0x13, 100
+end
+
+.channel enemy_boss_bongo_hurt
+ldlayer 0, layer_50D3
+ldlayer 1, layer_4524
+ldlayer 2, layer_4532
+ldlayer 3, layer_4829
+vibfreq 48
+vibdepth 48
+end
+
+.layer layer_50D3
+instr FONT01_INSTR_SCRUB_DEATH
+legato
+portamento 0x85, 4, 60
+notedv PITCH_D2, 0x32, 100
+notedv PITCH_AF1, 0x7F, 100
+end
+
+.channel enemy_boss_bongo_hand_hurt
+ldlayer 0, layer_50D3
+vibfreq 48
+vibdepth 48
+end
+
+.channel enemy_boss_bongo_vanish
+instr FONT01_INSTR_POE_DISAPPEAR
+ldlayer 0, layer_50F8
+ldlayer 1, layer_50F6
+vibfreq 96
+vibdepth 80
+end
+
+.layer layer_50F6
+transpose 6
+
+.layer layer_50F8
+portamento 0x81, 27, 255
+notedv PITCH_C2, 0x118, 100
+end
+
+.channel enemy_beamos_beam
+instr FONTANY_INSTR_BELL
+ldlayer 0, layer_510B
+vibfreq 128
+vibdepth 116
+end
+
+.layer layer_510B
+notedv PITCH_F4, 30000, 64
+rjump layer_510B
+
+.channel enemy_beamos_idle
+instr FONT01_INSTR_BABA_LUNGE
+ldlayer 0, layer_511B
+vibfreq 208
+vibdepth 96
+end
+
+.layer layer_511B
+notedv PITCH_F1, 30000, 64
+rjump layer_511B
+
+.channel enemy_beamos_ground_hit
+instr FONT01_INSTR_DINO_INHALE
+ldlayer 0, layer_5127
+end
+
+.layer layer_5127
+notedv PITCH_DF1, 30000, 100
+rjump layer_5127
+
+.channel enemy_beamos_charging
+ldlayer 0, layer_45DF
+vibfreq 160
+vibdepth 160
+end
+
+.channel enemy_tektite_flip
+instr FONT01_INSTR_WATER_BUBBLES
+ldlayer 0, layer_5142
+ldlayer 1, layer_5144
+vibfreq 176
+vibdepth 160
+end
+
+.layer layer_5142
+transpose -5
+
+.layer layer_5144
+portamento 0x85, 39, 100
+notedv PITCH_E3, 0x10, 100
+notedv PITCH_DF5, 0x13, 100
+end
+
+.channel enemy_torch_slug_crawl
+ldlayer 0, layer_5160
+ldlayer 1, layer_5156
+end
+
+.layer layer_5156
+instr FONT01_INSTR_EGG_CRACK
+portamento 0x81, 8, 255
+notedv PITCH_C2, 0x40, 100
+end
+
+.layer layer_5160
+ldelay 0x8
+rjump layer_5156
+
+.channel enemy_torch_slug_target
+ldlayer 0, layer_516C
+vibfreq 64
+vibdepth 96
+end
+
+.layer layer_516C
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x85, 39, 255
+notedv PITCH_D4, 0x8, 100
+notedv PITCH_A3, 0x20, 100
+end
+
+.channel enemy_torch_slug_die
+ldlayer 0, layer_5188
+ldlayer 1, layer_418B
+ldlayer 2, layer_4829
+vibfreq 64
+vibdepth 192
+end
+
+.layer layer_5188
+instr FONT01_INSTR_DINO_ROAR
+legato
+portamento 0x85, 25, 255
+notedv PITCH_GF3, 0x14, 80
+notedv PITCH_GF2, 0x60, 80
+end
+
+.channel enemy_tile_fly
+instr FONT01_INSTR_SWOOSH
+ldlayer 0, layer_519C
+end
+
+.layer layer_519C
+loop 6
+notedv PITCH_C5, 0x9, 100
+notedv PITCH_D5, 0x9, 100
+notedv PITCH_E5, 0x9, 100
+loopend
+
+.layer layer_51A8
+env envelope_697C, 255
+.layer layer_51AC
+notedv PITCH_GF5, 0x6, 100
+notedv PITCH_AF5, 0x6, 100
+notedv PITCH_BF5, 0x6, 100
+notedv PITCH_AF5, 0x6, 100
+rjump layer_51AC
+
+.channel enemy_firedancer_kick
+instr 2
+ldlayer 0, layer_51C0
+end
+
+.layer layer_51C0
+notedv PITCH_A2, 0x30, 100
+end
+
+.channel enemy_firedancer_spin
+ldlayer 0, layer_51CB
+ldlayer 1, layer_51D9
+end
+
+.layer layer_51CB
+instr FONT01_INSTR_BOULDER
+.layer layer_51CD
+transpose 12
+env envelope_6A7C, 224
+.layer layer_51D3
+notedv PITCH_C5, 30000, 100
+rjump layer_51D3
+
+.layer layer_51D9
+instr FONT01_INSTR_GANONDORF_FLY
+rjump layer_51CD
+
+.channel enemy_firehead_run
+instr FONT01_INSTR_SMASH
+ldlayer 0, layer_51E3
+end
+
+.layer layer_51E3
+portamento 0x81, 20, 64
+notedv PITCH_BF1, 0xD, 100
+end
+
+.channel enemy_firehead_hurt
+ldlayer 0, layer_51F6
+ldlayer 1, layer_4829
+vibfreq 64
+vibdepth 208
+end
+
+.layer layer_51F6
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 47, 100
+notedv PITCH_F5, 0x14, 100
+notedv PITCH_AF4, 0x24, 100
+end
+
+.channel enemy_firedancer_hurt
+ldlayer 0, layer_4301
+end
+
+.channel enemy_firedancer_laugh
+ldlayer 0, layer_521B
+ldlayer 1, layer_5219
+ldlayer 2, layer_5226
+ldlayer 3, layer_5228
+vibfreq 48
+vibdepth 32
+end
+
+.layer layer_5219
+transpose 2
+
+.layer layer_521B
+instr 2
+portamento 0x81, 21, 255
+notedv PITCH_B4, 0xE0, 100
+end
+
+.layer layer_5226
+transpose 1
+
+.layer layer_5228
+instr FONT01_INSTR_PHANTOM_LAUGH_1
+notedv PITCH_F4, 0xE0, 100
+end
+
+.channel enemy_moblin_club_shockwave
+instr FONT01_INSTR_DINO_INHALE
+ldlayer 0, layer_523A
+ldlayer 1, layer_523C
+releaserate 224
+end
+
+.layer layer_523A
+transpose -6
+
+.layer layer_523C
+notedv PITCH_GF2, 30000, 100
+rjump layer_523C
+
+.channel enemy_peahat_jr_fly
+instr FONT01_INSTR_SWOOSH
+ldlayer 0, layer_524B
+env envelope_697C
+end
+
+.layer layer_524B
+notedv PITCH_GF5, 0x6, 80
+notedv PITCH_AF5, 0x6, 80
+notedv PITCH_BF5, 0x6, 80
+notedv PITCH_AF5, 0x6, 80
+rjump layer_524B
+
+.channel enemy_boss_bongo_paralyze
+ldlayer 0, layer_4524
+ldlayer 1, layer_4532
+vibfreq 48
+vibdepth 48
+end
+
+.channel enemy_boss_bongo_die
+ldlayer 0, layer_5277
+ldlayer 1, layer_5275
+ldlayer 2, layer_5286
+ldlayer 3, layer_4829
+vibfreq 70
+vibdepth 86
+end
+
+.layer layer_5275
+transpose 2
+
+.layer layer_5277
+instr FONT01_INSTR_MONSTER_ROAR
+.layer layer_5279
+legato
+portamento 0x85, 27, 127
+notedv PITCH_A3, 0x28, 100
+notedv PITCH_E3, 0xC8, 100
+end
+
+.layer layer_5286
+instr FONT01_INSTR_THUNDER_HURT
+transpose 12
+rjump layer_5279
+
+.channel enemy_boss_bongo_dissipate
+ldlayer 0, layer_529A
+ldlayer 1, layer_52A6
+ldlayer 2, layer_52A8
+vibfreq 20
+vibdepth 20
+end
+
+.layer layer_529A
+instr FONT01_INSTR_DINO_INHALE
+.layer layer_529C
+env envelope_6A7C, 200
+.layer layer_52A0
+notedv PITCH_C2, 30000, 100
+rjump layer_52A0
+
+.layer layer_52A6
+transpose -1
+
+.layer layer_52A8
+instr 2
+rjump layer_529C
+
+.channel enemy_boss_bongo_charge
+ldlayer 0, layer_52BC
+ldlayer 1, layer_52C4
+ldlayer 2, layer_52BA
+vibfreq 96
+vibdepth 84
+end
+
+.layer layer_52BA
+transpose 4
+
+.layer layer_52BC
+instr FONT01_INSTR_DINO_INHALE
+.layer layer_52BE
+notedv PITCH_A2, 30000, 100
+rjump layer_52BE
+
+.layer layer_52C4
+instr FONT01_INSTR_BOULDER
+.layer layer_52C6
+notedv PITCH_A4, 30000, 80
+rjump layer_52C6
+
+.channel enemy_boss_bongo_chant
+instr FONT01_INSTR_BONGO_BONGO
+ldlayer 0, layer_52D2
+end
+
+.layer layer_52D2
+transpose 48
+notedv PITCH_BF2, 0xE0, 100
+end
+
+.channel enemy_like_like_die
+ldlayer 0, layer_3FBA
+ldlayer 1, layer_5188
+ldlayer 2, layer_4829
+vibfreq 64
+vibdepth 192
+end
+
+.channel enemy_leever_die
+ldlayer 0, layer_3F78
+ldlayer 1, layer_400C
+ldlayer 2, layer_4829
+vibfreq 112
+vibdepth 48
+end
+
+.channel enemy_gerudo_attack
+ldlayer 0, layer_4081
+ldlayer 1, layer_52FC
+end
+
+.layer layer_52FC
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_GERUDO_ATTACK, 0x0, 80
+end
+
+.channel enemy_gerudo_hurt
+ldlayer 0, layer_5309
+ldlayer 1, layer_4829
+end
+
+.layer layer_5309
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_GERUDO_HURT, 0x0, 100
+end
+
+.channel enemy_gerudo_defeat
+ldlayer 0, layer_5316
+ldlayer 1, layer_4829
+end
+
+.layer layer_5316
+instr FONTANY_INSTR_SFX
+notedv FONT01_EFFECT_GERUDO_DEFEAT, 0x0, 100
+end
+
+.channel enemy_wolfos_walk
+ldlayer 0, layer_5320
+end
+
+.layer layer_5320
+instr FONT01_INSTR_SMASH
+portamento 0x81, 44, 64
+notedv PITCH_GF3, 0x5, 72
+end
+
+.channel enemy_anubis_die
+ldlayer 0, layer_5335
+ldlayer 1, layer_533C
+vibfreq 56
+vibdepth 50
+end
+
+.layer layer_5335
+instr 2
+notedv PITCH_C3, 0xC8, 100
+end
+
+.layer layer_533C
+instr FONT01_INSTR_PHANTOM_WAIL
+legato
+portamento 0x85, 32, 200
+notedv PITCH_D4, 0x10, 100
+notedv PITCH_EF3, 0x96, 100
+end
+
+.channel enemy_anubis_fire_hit
+ldlayer 0, layer_534F
+end
+
+.layer layer_534F
+instr FONT01_INSTR_EXPLOSION_LAVA
+legato
+portamento 0x85, 30, 255
+notedv PITCH_B3, 0x20, 100
+notedv PITCH_E2, 0x50, 100
+end
+
+.channel enemy_destroyed_light_arrow
+ldlayer 0, layer_5365
+vibfreq 208
+vibdepth 208
+end
+
+.layer layer_5365
+instr FONT01_INSTR_DINO_INHALE
+legato
+transpose 15
+portamento 0x85, 39, 239
+notedv PITCH_DF3, 0x18, 100
+notedv PITCH_B5, 0x38, 100
+end
+
+.channel enemy_freezard_hurt
+ldlayer 0, layer_3A9A
+ldlayer 1, layer_3962
+ldlayer 2, layer_4829
+end
+
+.channel enemy_freezard_die
+ldlayer 0, layer_3A47
+ldlayer 1, layer_3962
+ldlayer 2, layer_4829
+end
+
+.channel enemy_deadhand_burrow
+ldlayer 0, layer_538D
+end
+
+.layer layer_538D
+instr FONT01_INSTR_EXPLOSION_LAVA
+env envelope_68B4, 220
+notedv PITCH_D4, 0x64, 100
+end
+
+.channel enemy_deadhand_laugh
+instr FONT01_INSTR_PHANTOM_LAUGH_1
+ldlayer 0, layer_539F
+gain 16
+end
+
+.layer layer_539F
+portamento 0x81, 35, 239
+notedv PITCH_AF2, 0xE0, 100
+end
+
+.channel enemy_knuckle_armor_hurt
+ldlayer 0, layer_53B3
+ldlayer 1, layer_4829
+vibfreq 224
+vibdepth 96
+end
+
+.layer layer_53B3
+instr FONT01_INSTR_SLIDE_BOOTS
+notedv PITCH_A2, 0x40, 100
+end
+
+.channel enemy_knuckle_pillar_break
+ldlayer 0, layer_53C0
+ldlayer 1, layer_53B3
+end
+
+.layer layer_53C0
+instr FONT01_INSTR_EXPLOSION_LAVA
+notedv PITCH_AF3, 0x4, 100
+notedv PITCH_BF3, 0x4, 100
+notedv PITCH_DF4, 0x5, 100
+notedv PITCH_F4, 0x7, 100
+notedv PITCH_B3, 0x30, 100
+end
+
+.channel enemy_knuckle_stump_break
+ldlayer 0, layer_53C0
+end
+
+.channel enemy_knuckle_axe_stuck
+ldlayer 0, layer_364C
+ldlayer 1, layer_53B3
+end
+
+.channel enemy_boss_ganon_attack
+ldlayer 0, layer_4220
+ldlayer 1, layer_53E4
+end
+
+.layer layer_53E4
+instr FONT01_INSTR_ELECTRIC_ATTACK
+notedv PITCH_B5, 0x5A, 70
+end
+
+.channel enemy_pot_fly
+instr FONT01_INSTR_SWOOSH
+ldlayer 0, layer_51A8
+end
+
+.channel enemy_ganondorf_vortex_charge
+ldlayer 0, layer_5008
+ldlayer 1, layer_53FB
+vibfreq 48
+vibdepth 240
+end
+
+.layer layer_53FB
+instr FONT01_INSTR_DINO_INHALE
+.layer layer_53FD
+notedv PITCH_A2, 30000, 64
+rjump layer_53FD
+
+.channel enemy_boss_vocals
+instr FONTANY_INSTR_SFX
+ldio 4
+sub 176
+stseq 0, layer_5417 # set semitone = sound id - 176
+ldseq addr_541C
+stseq 0, layer_5417+2
+ldlayer 0, layer_5417
+end
+
+.layer layer_5417
+notedvg 0, 0x0, 100, 0
+end
+
+.array addr_541C
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+
+.channel enemy_ganondorf_throw_orb
+ldlayer 0, layer_4220
+ldlayer 1, layer_4214
+end
+
+.channel enemy_ganondorf_hit_light
+ldlayer 0, layer_434A
+ldlayer 1, layer_434C
+end
+
+.channel enemy_shell_open
+ldlayer 0, layer_5458
+ldlayer 1, layer_5460
+end
+
+.layer layer_5458
+instr FONT01_INSTR_EGG_CRACK
+ldelay 0x8
+notedv PITCH_G2, 0x25, 100
+end
+
+.layer layer_5460
+instr FONT01_INSTR_BABA_ATTACK
+notedv PITCH_DF3, 0x2D, 100
+end
+
+.channel enemy_spike_trap_roll
+instr FONT01_INSTR_SLIDE_BOOTS
+ldlayer 0, layer_546C
+end
+
+.layer layer_546C
+notedv PITCH_EF2, 0xA, 50
+notedv PITCH_F2, 0xA, 50
+notedv PITCH_G2, 0xA, 50
+rjump layer_546C
+
+.channel enemy_stalkid_walk
+ldlayer 0, layer_547B
+end
+
+.layer layer_547B
+instr FONT01_INSTR_EGG_CRACK
+notedv PITCH_DF3, 0xE, 70
+end
+
+.channel enemy_stalkid_attack
+ldlayer 0, layer_5488
+ldlayer 1, layer_4081
+end
+
+.layer layer_5488
+instr FONT01_INSTR_PHANTOM_LAUGH_1
+transpose 14
+notedv PITCH_C5, 0x30, 100
+end
+
+.channel enemy_boss_ganon_paralyze
+ldlayer 0, layer_549E
+ldlayer 1, layer_54A0
+ldlayer 2, layer_54AE
+vibfreq 20
+vibdepth 50
+end
+
+.layer layer_549E
+ldelay 0x14
+
+.layer layer_54A0
+instr FONT01_INSTR_MONSTER_ROAR
+.layer layer_54A2
+legato
+portamento 0x85, 28, 255
+notedv PITCH_F2, 0x30, 100
+notedv PITCH_EF2, 0x48, 100
+end
+
+.layer layer_54AE
+instr FONT01_INSTR_DINO_ROAR
+transpose 4
+rjump layer_54A2
+
+.channel enemy_boss_ganon_die
+ldlayer 0, layer_54C5
+ldlayer 1, layer_54C7
+ldlayer 2, layer_54E9
+ldlayer 3, layer_54EB
+vibfreq 20
+vibdepth 50
+end
+
+.layer layer_54C5
+ldelay 0xA
+
+.layer layer_54C7
+instr FONT01_INSTR_MONSTER_ROAR
+loop 4
+portamento 0x81, 30, 107
+notedv PITCH_F4, 0x8C, 100
+.layer layer_54D3
+legato
+portamento 0x85, 39, 255
+notedv PITCH_G4, 0x30, 100
+notedv PITCH_AF3, 0x48, 100
+nolegato
+loopend
+portamento 0x81, 35, 255
+notedv PITCH_BF2, 0xFA, 100
+end
+
+.layer layer_54E9
+ldelay 0xA
+
+.layer layer_54EB
+instr FONT01_INSTR_DINO_ROAR
+loop 4
+portamento 0x81, 44, 107
+notedv PITCH_A4, 0x8C, 100
+.layer layer_54F7
+legato
+portamento 0x85, 47, 255
+notedv PITCH_BF4, 0x32, 100
+notedv PITCH_D4, 0x48, 100
+nolegato
+loopend
+portamento 0x81, 37, 255
+notedv PITCH_C3, 0xC8, 100
+end
+
+.channel enemy_boss_ganon_penultimate_hit
+ldlayer 0, layer_551B
+ldlayer 1, layer_551D
+ldlayer 2, layer_5523
+vibfreq 20
+vibdepth 50
+end
+
+.layer layer_551B
+ldelay 0xD
+
+.layer layer_551D
+instr FONT01_INSTR_MONSTER_ROAR
+loop 1
+rjump layer_54D3
+
+.layer layer_5523
+instr FONT01_INSTR_DINO_ROAR
+loop 1
+rjump layer_54F7
+
+.channel enemy_wolfos_spawn
+instr FONT01_INSTR_ANIMALS
+ldlayer 0, layer_552F
+end
+
+.layer layer_552F
+portamento 0x81, 42, 40
+notedv PITCH_G4, 0x7F, 100
+end
+
+.channel enemy_wolfos_attack
+ldlayer 0, layer_553E
+ldlayer 1, layer_4081
+end
+
+.layer layer_553E
+instr FONT01_INSTR_ANIMALS
+portamento 0x81, 35, 72
+notedv PITCH_F4, 0x40, 100
+end
+
+.channel enemy_wolfos_hurt
+instr FONT01_INSTR_ANIMALS
+ldlayer 0, layer_5551
+ldlayer 1, layer_4829
+end
+
+.layer layer_5551
+legato
+portamento 0x85, 39, 192
+notedv PITCH_F4, 0x20, 100
+notedv PITCH_DF4, 0x20, 100
+end
+
+.channel enemy_wolfos_die
+instr FONT01_INSTR_ANIMALS
+ldlayer 0, layer_5566
+ldlayer 1, layer_4829
+end
+
+.layer layer_5566
+legato
+portamento 0x85, 39, 128
+notedv PITCH_B4, 0x1C, 100
+notedv PITCH_AF4, 0x60, 100
+end
+
+.channel enemy_wolfos_howl
+instr FONT01_INSTR_ANIMALS
+ldlayer 0, layer_5578
+end
+
+.layer layer_5578
+notedv PITCH_D4, 0x70, 75
+end
+
+.channel enemy_guay_hurt
+ldlayer 0, layer_5583
+ldlayer 1, layer_4829
+end
+
+.layer layer_5583
+instr FONT01_INSTR_GUAY_HURT
+legato
+portamento 0x85, 34, 255
+notedv PITCH_C4, 0xA, 100
+notedv PITCH_A3, 0x1E, 100
+end
+
+.channel enemy_guay_die
+ldlayer 0, layer_5598
+ldlayer 1, layer_4829
+end
+
+.layer layer_5598
+instr FONT01_INSTR_GUAY_HURT
+legato
+portamento 0x85, 39, 255
+notedv PITCH_G3, 0xF, 100
+notedv PITCH_DF2, 0x60, 100
+end
+
+.channel enemy_guay_chirp
+ldlayer 0, layer_55AE
+vibfreq 112
+vibdepth 64
+end
+
+.layer layer_55AE
+instr FONT01_INSTR_ANIMALS
+transpose 48
+notedv PITCH_C4, 0xC, 100
+notedv PITCH_D4, 0x14, 100
+end
+
+.channel enemy_guay_attack
+ldlayer 0, layer_55C1
+vibfreq 112
+vibdepth 64
+end
+
+.layer layer_55C1
+instr FONT01_INSTR_ANIMALS
+transpose 48
+notedv PITCH_F4, 0xC, 100
+notedv PITCH_D4, 0x12, 100
+notedv PITCH_E4, 0xC, 100
+notedv PITCH_D4, 0x10, 100
+end
+
+.channel enemy_guay_fly
+instr FONT01_INSTR_OWL_FLAP
+ldlayer 0, layer_55D8
+end
+
+.layer layer_55D8
+portamento 0x81, 22, 200
+notedv PITCH_D3, 0x26, 68
+end
+
+.channel enemy_biggoron_blind
+ldlayer 0, layer_55E4
+end
+
+.layer layer_55E4
+instr FONT01_INSTR_GORON
+transpose 48
+notedv PITCH_BF3, 0x45, 100
+end
+
+.channel enemy_biggoron_happy
+ldlayer 0, layer_55F3
+ldlayer 1, layer_55F5
+end
+
+.layer layer_55F3
+ldelay 0xC
+
+.layer layer_55F5
+instr FONT01_INSTR_GORON_YAWN
+transpose 48
+notedv PITCH_C4, 0x7F, 100
+end
+
+.channel enemy_boss_ganon_growl
+ldlayer 0, layer_5604
+ldlayer 1, layer_5606
+end
+
+.layer layer_5604
+ldelay 0x14
+
+.layer layer_5606
+instr FONT01_INSTR_MONSTER_ROAR
+legato
+portamento 0x85, 19, 191
+notedv PITCH_GF2, 0x34, 100
+notedv PITCH_E2, 0xC0, 100
+end
+
+.channel enemy_gold_skull_spin
+ldlayer 0, layer_561C
+ldlayer 1, layer_5626
+end
+
+.layer layer_561C
+instr FONT01_INSTR_GRASS_RUSTLE
+portamento 0x81, 31, 100
+notedv PITCH_C3, 0x32, 80
+end
+
+.layer layer_5626
+instr FONT01_INSTR_SLIDE_BOOTS
+ldelay 0x10
+transpose 24
+notedv PITCH_C2, 0x6, 36
+notedv PITCH_F2, 0x6, 36
+notedv PITCH_C3, 0x6, 36
+notedv PITCH_F3, 0x6, 36
+notedv PITCH_C4, 0x6, 36
+end
+
+.channel enemy_boss_ganon_sword_clank
+ldlayer 0, layer_5643
+ldlayer 1, layer_5647
+end
+
+.layer layer_5643
+transpose 44
+rjump layer_5649
+
+.layer layer_5647
+transpose 48
+.layer layer_5649
+instr FONT01_INSTR_WITCH_ARGUE
+notedv PITCH_EF4, 0x7F, 100
+end
+
+.channel enemy_skulltula_creak
+instr FONT01_INSTR_MECH
+ldlayer 0, layer_5655
+end
+
+.layer layer_5655
+notedv PITCH_EF3, 0x40, 100
+end
+
+.channel enemy_boss_twinrova_bicker
+instr FONT01_INSTR_WITCH_ARGUE
+ldlayer 0, layer_5675
+.channel chan_565E
+rand 32
+stseq 40, layer_5675+1
+stseq 40, chan_566E+1
+rand 6
+stseq 100, layer_5675
+.channel chan_566E
+ldi 1
+call delay_varyingvol
+rjump chan_565E
+
+.layer layer_5675
+notedv PITCH_C3, 0x50, 100
+rjump layer_5675
+
+.channel enemy_big_poe_caught_soul
+instr FONT01_INSTR_DINO_ROAR
+ldlayer 0, layer_5684
+vibfreq 56
+vibdepth 64
+end
+
+.layer layer_5684
+env envelope_6A2C, 230
+.layer layer_5688
+notedv PITCH_DF2, 0xD0, 56
+rjump layer_5688
+
+.channel enemy_goron_child_cry
+ldlayer 0, layer_5696
+vibfreq 54
+vibdepth 128
+end
+
+.layer layer_5696
+instr FONT01_INSTR_GORON
+transpose 48
+portamento 0x81, 46, 255
+notedv PITCH_GF3, 0x70, 88
+end
+
+.channel enemy_spike_trap_rock
+ldlayer 0, layer_56AA
+vibfreq 224
+vibdepth 96
+end
+
+.layer layer_56AA
+instr FONT01_INSTR_SLIDE_BOOTS
+notedv PITCH_A2, 0x40, 76
+end
+
+.channel enemy_unused
+end
+
+.filter filter_enemy0
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter filter_enemy1
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter filter_enemy2
+filter 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/assets/sequences/sfxbanks/env.seq.inc b/assets/sequences/sfxbanks/env.seq.inc
new file mode 100644
index 00000000000..e750f1d60d8
--- /dev/null
+++ b/assets/sequences/sfxbanks/env.seq.inc
@@ -0,0 +1,4070 @@
+.table table_env
+entry env_door_open
+entry env_door_close
+entry env_explosion
+entry env_horse_trot
+entry env_horse_gallop
+entry env_horse_neigh
+entry env_river
+entry env_waterfall_large
+entry env_zora_surface
+entry env_zora_dive
+entry env_block_push
+entry env_lava_bubbling_old
+entry env_drawbridge_lower
+entry env_drawbridge_raise
+entry env_drawbridge_lowered
+entry env_drawbridge_raised
+entry env_bwall_break
+entry env_cucco_cluck
+entry env_cucco_attack
+entry env_cucco_crow
+entry env_door_slide_open
+entry env_switch_press
+entry env_horse_snort
+entry env_bomb_hit_water
+entry env_horse_jump
+entry env_horse_land
+entry env_horse_slip
+entry env_fairy_awake
+entry env_door_slide_close
+entry env_door_stone_close
+entry env_door_time_open
+entry env_treasure_unlock
+entry env_treasure_open
+entry env_timer_tick
+entry env_torch_light
+entry env_guard_attention
+entry env_elevator_move
+entry env_warp_circle
+entry env_warp_circle_enter
+entry env_stairs_lower
+entry env_waterfall_small
+entry env_river_slow
+entry env_river_fast
+entry env_horse_phantom_gallop
+entry env_horse_stop_sand
+entry env_electric_charge
+entry env_thunder_bolt_crash
+entry env_bomb_rebound
+entry env_water_drip
+entry env_fire_crackle
+entry env_lava_bubbling
+entry env_flame_jet
+entry env_flame_wall
+entry env_block_lock
+entry env_door_metal_open_unused
+entry env_door_slide_unlock_unused
+entry env_block_shake
+entry env_crate_break
+entry env_switch_hammer
+entry env_lava_bubbling_eerie
+entry env_fence_raise
+entry env_horse_ganon_neigh
+entry env_horse_ganon_snort
+entry env_phantom_warp
+entry env_witch_warp
+entry env_water_fountain
+entry env_horse_child_trot
+entry env_horse_child_gallop
+entry env_horse_child_neigh
+entry env_horse_child_snort
+entry env_barrier_node_fadeout
+entry env_barrier_dispell
+entry env_tree_cut
+entry env_volcano_erupt
+entry env_guillotine_rise
+entry env_guillotine_fall
+entry env_scythe_spin
+entry env_guillotine_chain
+entry env_plant_break
+entry env_ship_bell
+entry env_flag_flutter
+entry env_unused
+entry env_rock_break
+entry env_phantom_warp2
+entry env_phantom_warp_loop
+entry env_coffin_open
+entry env_coffin_close
+entry env_fan_spin
+entry env_trap_wall_slide
+entry env_door_slide_lock
+entry env_door_slide_unlock
+entry env_flame_jet_low
+entry env_ganon_block_sink
+entry env_crowd_chatter
+entry env_water_change
+entry env_fairy_hide
+entry env_ladder_land
+entry env_web_bend
+entry env_web_break
+entry env_unused2
+entry env_door_jabu_open
+entry env_door_jabu_close
+entry env_door_wood_creak_unused
+entry env_gate_open
+entry env_bottle_scoop_water
+entry env_fish_flop
+entry env_scarecrow_sway
+entry env_scarecrow_spin
+entry env_bottle_open
+entry env_jabu_inhale
+entry env_stone_resonate
+entry env_triforce_flash
+entry env_ruto_trip
+entry env_fairy_fly
+entry env_fairy_crash
+entry env_spear_ready
+entry env_unused3
+entry env_water_drip_unused
+entry env_windmill_gear
+entry env_bush_sway
+entry env_horse_demo_gallop
+entry env_elevator_geared_move
+entry env_elevator_geared_stop
+entry env_treasure_warp
+entry env_door_unlock
+entry env_trap_blade_move
+entry env_fairy_heal_old
+entry env_great_fairy_appear
+entry env_great_fairy_vanish
+entry env_trap_eye_fire
+entry env_gears_unused
+entry env_wall_move_unused
+entry env_treasure_flash
+entry env_windmill_blade
+entry env_warp_unused
+entry env_pot_break
+entry env_pot_drop
+entry player_large_splash
+entry player_small_splash
+entry env_goddess_fly
+entry env_triforce_aura
+entry env_triforce_glow
+entry env_deku_tree_death
+entry env_jabu_platform_rise
+entry env_jabu_platform_fall
+entry env_door_jabu_unlock
+entry env_door_jabu_lock
+entry env_door_time_stop
+entry env_stone_restore
+entry env_medal_acquire
+entry env_unused4
+entry env_light_arrow_acquire
+entry env_earthquake
+entry env_trap_crystal
+entry env_sage_warp
+entry env_sage_charge
+entry env_sage_charge
+entry env_time_travel_end
+entry env_jabu_platform_rise_stop
+entry env_jabu_platform_fall_stop
+entry env_goron_fall
+entry env_spell_fire_stance
+entry env_ice_melt
+entry env_fire_pillar
+entry env_unused5
+entry env_magic_vanish
+entry env_ocarina_warp
+entry env_ocarina_arrive
+entry env_fairy_heal
+entry env_door_boss_unlock
+entry env_crate_small_break
+entry env_crate_small_drop
+entry env_ruto_rebound_jabu
+entry env_door_creak_rumble
+entry env_night_howl
+entry env_jabu_groan
+entry item_sword_swing
+entry env_frog_jump
+entry env_ice_freeze_old
+entry env_fire_wall
+entry env_wood_rebound
+entry env_water_drip_unused2
+entry env_jabu_breathe
+entry env_dalm_block_hit
+entry env_boulder_roll
+entry env_elevator_groan_unused
+entry env_diamond_switch_on
+entry env_kakariko_fire
+entry env_rainbow_bridge_appear
+entry env_flying_old
+entry env_flying_end_old
+entry env_deku_sprout_grow
+entry env_desert_storm
+entry env_triforce_mark
+entry env_grave_explode
+entry player_swim
+entry player_lift_pot
+entry env_obj_drop_water
+entry env_obj_lift_water
+entry env_ganondorf_cloak
+entry env_dig
+entry env_unused6
+entry env_lab_bubbles
+entry env_ice_break_old
+entry env_frog_grow
+entry env_water_flow
+entry env_gate_large_open
+entry env_goddess_face_break
+entry env_goddess_face_explode
+entry env_goddess_face_crumble
+entry env_trap_blade_move_old
+entry system_minigame_bell
+entry env_unused7
+entry env_warp_lower
+entry env_sage_chamber_ambient
+entry env_sage_chamber_energy
+entry env_dog_bark
+entry env_zelda_cast_spell
+entry env_rain
+entry env_door_metal_open
+entry env_door_metal_close
+entry env_whirlpool
+entry env_tower_break
+entry env_cow_moo
+entry env_obj_break_unused
+entry env_rock_barrier_hit
+entry env_deku_sprout_grow
+entry env_frog_croak_leave
+entry env_frog_croak_grow
+entry env_cow_moo_distant
+entry env_door_ranch_close
+entry env_butterfly_transform
+entry system_silver_rupee
+entry env_gossip_stretch
+entry env_gossip_launch
+entry env_door_slide_close
+entry env_spike_log_roll
+entry env_barrier_energy
+entry env_barrier_hum
+entry env_child_walk
+entry env_guard_walk
+entry env_pillar_stop
+entry env_deku_sprout_grow
+entry env_frog_croak_leave
+entry env_frog_croak_grow
+entry env_cow_moo_distant
+entry env_door_ranch_close
+entry env_butterfly_transform
+
+.channel env_door_open_oca
+rvrbidx 1
+ldi 0
+stio 1
+
+.channel env_door_open
+ldlayer 0, layer_18CE
+end
+
+.layer layer_18CE
+instr FONT00_INSTR_DOOR_WOOD
+notedv PITCH_A3, 0x30, 100
+instr FONT00_INSTR_CREAK
+notedv PITCH_A3, 0x30, 75
+end
+
+.channel env_door_close
+ldlayer 0, layer_18DD
+end
+
+.layer layer_18DD
+instr FONT00_INSTR_DOOR_WOOD
+transpose 48
+notedv PITCH_A3, 0x60, 100
+end
+
+.channel env_explosion
+ldlayer 0, layer_18E9
+end
+
+.layer layer_18E9
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_65E8, 251
+notedv PITCH_A4, 0xC, 110
+notedv PITCH_A3, 0x7F, 110
+end
+
+.channel env_horse_trot
+instr FONT00_INSTR_HORSE_GALLOP
+ldlayer 0, layer_18FC
+end
+
+.layer layer_18FC
+notedv PITCH_G3, 0x18, 110
+end
+
+.channel env_horse_gallop
+instr FONT00_INSTR_HORSE_GALLOP
+ldlayer 0, layer_1906
+end
+
+.layer layer_1906
+notedv PITCH_C4, 0x25, 110
+end
+
+.channel env_horse_neigh
+instr FONT00_INSTR_HORSE_VOCALS
+ldlayer 0, layer_1910
+end
+
+.layer layer_1910
+notedv PITCH_C4, 0xAF, 110
+end
+
+.channel env_river
+instr FONT00_INSTR_WATER_FLOWING
+panweight 48
+ldlayer 0, layer_1922
+ldlayer 1, layer_1920
+end
+
+.layer layer_1920
+transpose 7
+
+.layer layer_1922
+legato
+.layer layer_1923
+notedv PITCH_C3, 0x7D00, 75
+rjump layer_1923
+
+.channel env_waterfall_large
+panweight 48
+ldlayer 0, layer_1936
+ldlayer 1, layer_1932
+end
+
+.layer layer_1932
+transpose 54
+rjump layer_1938
+
+.layer layer_1936
+transpose 48
+.layer layer_1938
+instr FONT00_INSTR_WATER_FLOWING
+env envelope_66F4, 220
+legato
+.layer layer_193F
+notedv PITCH_C4, 0x7D00, 92
+rjump layer_193F
+
+.channel env_zora_surface
+instr FONT00_INSTR_WATER_SPLASH
+env envelope_6610
+ldlayer 0, layer_194E
+end
+
+.layer layer_194E
+notedv PITCH_B4, 0x6, 100
+portamento 0x81, 48, 200
+notedv PITCH_E4, 0x48, 90
+end
+
+.channel env_zora_dive
+ldlayer 0, layer_195D
+end
+
+.layer layer_195D
+instr FONT00_INSTR_WATER_SPLASH
+env envelope_65FC, 127
+portamento 0x81, 36, 200
+notedv PITCH_A2, 0x7F, 90
+end
+
+.channel env_block_push
+ldlayer 0, layer_196F
+end
+
+.layer layer_196F
+instr FONT00_INSTR_ROLL_BOULDER
+releaserate 245
+legato
+portamento 0x1, 15, 48
+.layer layer_1978
+notedv PITCH_C3, 32700, 100
+rjump layer_1978
+
+.channel env_lava_bubbling_old
+instr FONT00_INSTR_LAVA
+panweight 48
+releaserate 112
+ldlayer 0, layer_1988
+end
+
+.layer layer_1988
+legato
+.layer layer_1989
+notedv PITCH_E3, 32700, 100
+rjump layer_1989
+
+.channel env_drawbridge_lower
+ldlayer 0, layer_1996
+ldlayer 1, layer_19B0
+end
+
+.layer layer_1996
+instr FONT00_INSTR_CHAIN
+releaserate 235
+notedvg PITCH_F3, 0x19, 56, 10
+notedvg PITCH_G3, 0x17, 56, 10
+notedvg PITCH_A3, 0x15, 56, 10
+notedvg PITCH_BF3, 0x13, 56, 10
+.layer layer_19AA
+notedvg PITCH_C4, 0x13, 56, 10
+rjump layer_19AA
+
+.layer layer_19B0
+instr FONT00_INSTR_CHAIN_RETRACT
+legato
+portamento 0x85, 18, 255
+notedv PITCH_BF2, 0x14, 90
+notedv PITCH_EF3, 0xA, 90
+.layer layer_19BD
+notedv PITCH_EF3, 32700, 90
+rjump layer_19BD
+
+.channel env_drawbridge_raise
+instr FONT00_INSTR_CHAIN_RETRACT
+ldlayer 0, layer_19CC
+ldlayer 1, layer_19DD
+end
+
+.layer layer_19CC
+legato
+portamento 0x85, 20, 255
+notedv PITCH_A2, 0x1E, 90
+notedv PITCH_E3, 0xF, 90
+.layer layer_19D7
+notedv PITCH_E3, 32700, 90
+rjump layer_19D7
+
+.layer layer_19DD
+instr FONT00_INSTR_CHAIN
+releaserate 235
+notedvg PITCH_G3, 0x19, 56, 10
+notedvg PITCH_A3, 0x17, 56, 10
+notedvg PITCH_B3, 0x15, 56, 10
+notedvg PITCH_C4, 0x13, 56, 10
+.layer layer_19F1
+notedvg PITCH_D4, 0x11, 56, 10
+rjump layer_19F1
+
+.channel env_drawbridge_lowered
+env envelope_65E8
+ldlayer 0, layer_1A07
+ldlayer 1, layer_1A01
+end
+
+.layer layer_1A01
+instr FONT00_INSTR_SLAM_HEAVY
+notedv PITCH_B2, 0x64, 75
+end
+
+.layer layer_1A07
+instr FONT00_INSTR_STONE_STRIKE
+notedv PITCH_D1, 0xB4, 110
+end
+
+.channel env_drawbridge_raised
+env envelope_65E8
+ldlayer 0, layer_1A1E
+ldlayer 1, layer_1A18
+end
+
+.layer layer_1A18
+instr FONT00_INSTR_SLAM_HEAVY
+notedv PITCH_B2, 0x64, 75
+end
+
+.layer layer_1A1E
+instr FONT00_INSTR_STONE_STRIKE
+notedv PITCH_AF1, 0xB4, 110
+end
+
+.channel env_bwall_break
+ldlayer 0, layer_1A36
+ldlayer 1, layer_1B41
+end
+.channel chan_1A2C
+ldlayer 1, layer_1A34
+end
+
+.layer layer_1A30
+transpose -12
+rjump layer_1A36
+
+.layer layer_1A34
+transpose -24
+
+.layer layer_1A36
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_6688, 230
+portamento 0x81, 58, 127
+notedv PITCH_C4, 0x52, 95
+portamento 0x81, 51, 127
+notedv PITCH_F3, 0xB9, 70
+end
+
+.channel env_cucco_cluck
+instr FONT00_INSTR_ANIMALS_0
+ldlayer 0, layer_1A52
+end
+
+.layer layer_1A52
+portamento 0x81, 39, 255
+notedv PITCH_DF4, 0xA0, 105
+end
+
+.channel env_cucco_attack
+ldlayer 0, layer_1A5F
+end
+
+.layer layer_1A5F
+instr FONT00_INSTR_ANIMALS_1
+notedvg PITCH_AF3, 0xC, 95, 10
+instr FONT00_INSTR_ANIMALS_0
+env envelope_65D8, 251
+portamento 0x81, 51, 127
+notedv PITCH_E4, 0x48, 105
+end
+
+.channel env_cucco_crow
+instr FONT00_INSTR_ANIMALS_1
+ldlayer 0, layer_1A79
+end
+
+.layer layer_1A79
+notedv PITCH_C4, 0xA6, 105
+end
+
+.channel env_door_slide_open
+instr FONT00_INSTR_DOOR_METAL
+env envelope_6610
+ldlayer 0, layer_1A87
+end
+
+.layer layer_1A87
+portamento 0x81, 32, 175
+notedv PITCH_B3, 0x30, 115
+end
+
+.channel env_switch_press
+ldlayer 0, layer_1A96
+ldlayer 1, layer_1AA5
+end
+
+.layer layer_1A96
+instr FONT00_INSTR_STICK_ATTACK
+notedv PITCH_C4, 0x4, 105
+instr FONT00_INSTR_STONE_STRIKE
+env envelope_664C, 255
+notedv PITCH_BF1, 0x28, 105
+end
+
+.layer layer_1AA5
+instr FONT00_INSTR_STONE_STRIKE
+env envelope_664C, 251
+notedvg PITCH_C3, 0x4, 102, 96
+notedv PITCH_BF1, 0x28, 102
+end
+
+.channel env_horse_snort
+ldlayer 0, layer_1AB7
+end
+
+.layer layer_1AB7
+transpose 48
+.layer layer_1AB9
+instr FONT00_INSTR_HORSE_VOCALS
+legato
+portamento 0x85, 34, 255
+notedv PITCH_AF3, 0x6, 85
+notedv PITCH_EF3, 0x8, 85
+notedv PITCH_B2, 0x73, 85
+end
+
+.channel env_bomb_hit_water
+ldlayer 0, layer_1AD0
+end
+
+.layer layer_1ACE
+transpose 6
+
+.layer layer_1AD0
+instr FONT00_INSTR_WATER_SPLISH
+notedv PITCH_F4, 0x5C, 115
+end
+
+.channel env_horse_jump
+instr FONT00_INSTR_HORSE_GALLOP
+ldlayer 0, layer_1ADC
+end
+
+.layer layer_1ADC
+notedv PITCH_D4, 0x8, 110
+notedv PITCH_E4, 0xF, 110
+end
+
+.channel env_horse_land
+instr FONT00_INSTR_HORSE_GALLOP
+ldlayer 0, layer_1AE9
+end
+
+.layer layer_1AE9
+notedv PITCH_F4, 0xA, 110
+notedv PITCH_D4, 0x12, 110
+end
+
+.channel env_horse_slip
+instr FONT00_INSTR_SLIDE_BLOCK
+env envelope_667C
+ldlayer 0, layer_1AF9
+end
+
+.layer layer_1AF9
+portamento 0x81, 38, 255
+notedv PITCH_C3, 0x3C, 80
+end
+
+.channel env_fairy_awake
+ldlayer 0, layer_1B05
+end
+
+.layer layer_1B05
+instr FONT00_INSTR_FAIRY_MAGIC
+env envelope_6794, 251
+portamento 0x1, 52, 256
+notedv PITCH_B5, 0x48, 65
+end
+
+.channel env_door_slide_close
+instr FONT00_INSTR_DOOR_METAL
+env envelope_6610
+ldlayer 0, layer_1B1D
+end
+
+.layer layer_1B1D
+portamento 0x81, 38, 175
+notedv PITCH_F3, 0x30, 115
+end
+
+.channel env_door_stone_close
+gain 20
+ldlayer 0, layer_1B2E
+ldlayer 1, layer_1B41
+end
+
+.layer layer_1B2E
+instr FONT00_INSTR_MECH_CHARGE
+releaserate 160
+notedv PITCH_E4, 0x32, 102
+.layer layer_1B35
+instr FONT00_INSTR_BLOCK_LOCK
+env envelope_6740, 245
+notedv PITCH_E2, 0x64, 80
+end
+
+.layer layer_1B3F
+transpose 4
+
+.layer layer_1B41
+instr FONT00_INSTR_BLOCK_LOCK
+notedv PITCH_E3, 0x64, 110
+end
+
+.channel env_door_time_open
+instr FONT00_INSTR_DOOR_METAL
+env envelope_6674
+ldlayer 0, layer_1B57
+ldlayer 1, layer_1B53
+end
+
+.layer layer_1B53
+instr FONT00_INSTR_MECH_CHARGE
+transpose 22
+
+.layer layer_1B57
+legato
+portamento 0x81, 34, 175
+.layer layer_1B5C
+notedv PITCH_A2, 0x60, 115
+rjump layer_1B5C
+
+.channel env_treasure_unlock
+ldlayer 0, layer_1B71
+ldlayer 1, layer_1B68
+end
+
+.layer layer_1B68
+instr FONT00_INSTR_DOOR_WOOD
+notedv PITCH_A4, 0x3, 115
+notedv PITCH_E5, 0x6, 115
+end
+
+.layer layer_1B71
+ldelay 0x19
+instr FONT00_INSTR_CREAK
+portamento 0x81, 31, 255
+notedv PITCH_G3, 0x18, 100
+end
+
+.channel env_treasure_open
+ldlayer 0, layer_1B81
+end
+
+.layer layer_1B81
+instr FONT00_INSTR_CREAK
+env envelope_65FC, 250
+portamento 0x83, 32, 255
+notedvg PITCH_D3, 0x18, 100, 127
+notedv PITCH_C4, 0x48, 100
+end
+
+.channel env_timer_tick
+instr FONT00_INSTR_BOW
+ldi 7
+call delay_varyingvol
+notealloc 2
+allocnotelist 2
+ldlayer 0, layer_1BBA
+.channel chan_1BA1
+ldio 6
+and 3
+ldseq addr_1BB6
+stseq 0, layer_fn_1BE6+1
+stseq 8, @+1
+ldi 48
+call delay_varyingvol
+rjump chan_1BA1
+
+.array addr_1BB6
+byte 0x20
+byte 0xE
+byte 0x5
+byte 0x20
+
+.layer layer_1BBA
+transpose 48
+.layer layer_1BBC
+notedvg PITCH_B3, 0x2, 70, 127
+notedv PITCH_C3, 0x2, 70
+call layer_fn_1BE6
+notedvg PITCH_F3, 0x2, 70, 127
+notedv PITCH_GF2, 0x2, 70
+call layer_fn_1BE6
+notedvg PITCH_B4, 0x2, 70, 127
+notedv PITCH_C4, 0x2, 70
+call layer_fn_1BE6
+notedvg PITCH_F4, 0x2, 70, 127
+notedv PITCH_GF3, 0x2, 70
+call layer_fn_1BE6
+rjump layer_1BBC
+
+.layer layer_fn_1BE6
+ldelay 0x14
+end
+
+.channel env_torch_light
+gain 15
+ldlayer 0, layer_1BEF
+end
+
+.layer layer_1BEF
+instr FONT00_INSTR_IGNITE
+portamento 0x81, 27, 152
+notedv PITCH_C4, 0x3C, 100
+end
+
+.channel env_guard_attention
+instr FONT00_INSTR_SWORD_STRIKE
+ldlayer 0, layer_1C05
+ldlayer 1, layer_1C0B
+ldlayer 2, layer_1C0F
+end
+
+.layer layer_1C05
+ldelay 0x2
+notedv PITCH_C4, 0x1E, 90
+end
+
+.layer layer_1C0B
+notedv PITCH_E4, 0x1E, 90
+end
+
+.layer layer_1C0F
+transpose -12
+jump layer_12E7
+
+.channel env_elevator_move
+ldlayer 0, layer_1C1D
+ldlayer 1, layer_1C1B
+end
+
+.layer layer_1C1B
+transpose -12
+
+.layer layer_1C1D
+instr FONT00_INSTR_DOOR_METAL
+env envelope_6674, 251
+legato
+portamento 0x1, 26, 60
+.layer layer_1C28
+notedv PITCH_A3, 32700, 95
+rjump layer_1C28
+
+.channel env_warp_circle
+instr FONT00_INSTR_WARP
+releaserate 182
+ldlayer 0, layer_1C65
+ldlayer 1, layer_1C6F
+ldlayer 2, layer_1C61
+.channel chan_1C3B
+ldio 3
+and 240
+rbeqz chan_1C4E
+ldptr 0x0
+stptrtoseq envelope_1C7E+2
+ldptr 32700
+stptrtoseq envelope_1C8A+2
+rjump chan_1C5A
+.channel chan_1C4E
+ldptr 0x0
+stptrtoseq envelope_1C8A+2
+ldptr 32700
+stptrtoseq envelope_1C7E+2
+.channel chan_1C5A
+ldi 1
+call delay
+rjump chan_1C3B
+
+.layer layer_1C61
+stereo 20
+rjump layer_1C65
+
+.layer layer_1C65
+legato
+notedv PITCH_AF4, 0xC, 75
+.layer layer_1C69
+notedv PITCH_BF4, 32700, 75
+rjump layer_1C69
+
+.layer layer_1C6F
+legato
+notedv PITCH_D5, 0xC, 75
+.layer layer_1C73
+notedv PITCH_D5, 32700, 75
+rjump layer_1C73
+
+.envelope envelope_unused_1C7A
+point 1, 32700
+.envelope envelope_1C7E
+point 80, 32700
+goto 1
+
+.envelope envelope_unused_1C86
+point 1, 0
+.envelope envelope_1C8A
+point 80, 32700
+goto 1
+
+.envelope envelope_unused_1C92
+point 1, 32700
+point 80, 32700
+goto 1
+
+.channel env_warp_circle_enter
+instr FONT00_INSTR_WARP
+panweight 48
+ldi 25
+stio 1
+env envelope_6750
+releaserate 232
+ldlayer 0, layer_1CB4
+ldlayer 1, layer_1CCB
+ldlayer 2, layer_1CE7
+end
+
+.layer layer_1CB4
+notepan 24
+transpose 12
+notedv PITCH_D4, 0x18, 75
+legato
+releaserate 251
+portamento 0x85, 53, 255
+notedv PITCH_D5, 0x190, 90
+notedv PITCH_E5, 500, 90
+end
+
+.layer layer_1CCB
+notepan 64
+transpose 12
+notedv PITCH_D4, 0x18, 75
+notedv PITCH_D5, 0x190, 75
+transpose 0
+instr FONT00_INSTR_FAIRY
+env envelope_6778, 251
+portamento 0x81, 57, 255
+notedv PITCH_BF5, 500, 50
+end
+
+.layer layer_1CE7
+notepan 104
+transpose 24
+notedv PITCH_BF3, 0x18, 75
+legato
+releaserate 251
+portamento 0x85, 49, 255
+notedv PITCH_BF4, 0x190, 90
+notedv PITCH_C5, 500, 90
+end
+
+.channel env_stairs_lower
+instr FONT00_INSTR_EXPLOSION_0
+panweight 72
+ldlayer 0, layer_1D0C
+ldlayer 1, layer_1D70
+ldlayer 2, layer_1D44
+end
+
+.layer layer_1D0C
+env envelope_65E8, 200
+transpose -8
+.layer layer_1D12
+notepan 34
+notedv PITCH_A4, 0x8, 100
+notedv PITCH_A3, 0x18, 100
+notepan 74
+notedv PITCH_B4, 0x6, 85
+notedv PITCH_B3, 0x15, 85
+notepan 54
+notedv PITCH_F4, 0x9, 91
+notedv PITCH_G3, 0x1A, 91
+notepan 94
+notedv PITCH_A4, 0x7, 102
+notedv PITCH_F3, 0xB, 102
+notepan 44
+notedv PITCH_G4, 0x9, 86
+notedv PITCH_F3, 0x1D, 86
+notepan 64
+notedv PITCH_G4, 0x5, 88
+notedv PITCH_A3, 0x1B, 88
+rjump layer_1D12
+
+.layer layer_1D44
+env envelope_65E8, 127
+transpose -8
+.layer layer_1D4A
+notedv PITCH_G3, 0x9, 73
+notedv PITCH_F2, 0x22, 73
+notedv PITCH_A3, 0x9, 79
+notedv PITCH_F2, 0x1D, 79
+notedv PITCH_A3, 0x9, 87
+notedv PITCH_F2, 0x1B, 87
+notedv PITCH_E3, 0x7, 81
+notedv PITCH_D2, 0xF, 81
+notedv PITCH_A3, 0x9, 68
+notedv PITCH_C2, 0x18, 68
+notedv PITCH_G3, 0x5, 70
+notedv PITCH_C2, 0x21, 70
+rjump layer_1D4A
+
+.layer layer_1D70
+instr FONT00_INSTR_DOOR_METAL
+.layer layer_1D72
+notedv PITCH_DF3, 0x1C, 102
+rjump layer_1D72
+
+.channel env_waterfall_small
+instr FONT00_INSTR_WATER_FLOWING
+panweight 48
+releaserate 211
+ldlayer 0, layer_1D86
+ldlayer 1, layer_1D84
+end
+
+.layer layer_1D84
+transpose 10
+
+.layer layer_1D86
+legato
+.layer layer_1D87
+notedv PITCH_A3, 0x7D00, 75
+rjump layer_1D87
+
+.channel env_river_slow
+instr FONT00_INSTR_WATER_FLOWING
+panweight 64
+ldlayer 0, layer_1D9A
+ldlayer 1, layer_1D98
+end
+
+.layer layer_1D98
+transpose 4
+
+.layer layer_1D9A
+legato
+.layer layer_1D9B
+notedv PITCH_G2, 0x7D00, 60
+rjump layer_1D9B
+
+.channel env_river_fast
+instr FONT00_INSTR_WATER_FLOWING
+panweight 64
+ldlayer 0, layer_1DAE
+ldlayer 1, layer_1DAC
+end
+
+.layer layer_1DAC
+transpose 7
+
+.layer layer_1DAE
+legato
+.layer layer_1DAF
+notedv PITCH_G3, 0x7D00, 75
+rjump layer_1DAF
+
+.channel env_horse_phantom_gallop
+instr FONT00_INSTR_HORSE_GALLOP
+ldlayer 0, layer_1DBB
+end
+
+.layer layer_1DBB
+notedv PITCH_B3, 0x12, 110
+end
+
+.channel env_horse_stop_sand
+instr FONT00_INSTR_SLIDE_BLOCK
+env envelope_667C
+ldlayer 0, layer_1DC8
+end
+
+.layer layer_1DC8
+portamento 0x81, 38, 255
+notedv PITCH_C4, 0x20, 80
+end
+
+.channel env_electric_charge
+instr FONT00_INSTR_POTTERY_ELECTRIC
+ldi 32
+stio 1
+releaserate 245
+ldlayer 0, layer_1DE6
+ldlayer 1, layer_1DDE
+end
+
+.layer layer_1DDE
+portamento 0x81, 22, 255
+notedv PITCH_G3, 0x78, 70
+end
+
+.layer layer_1DE6
+portamento 1, 34, 48
+notedv PITCH_G4, 0x78, 70
+end
+
+.channel env_thunder_bolt_crash
+gain 15
+ldlayer 0, layer_1DFE
+ldlayer 1, layer_1DFA
+ldlayer 2, layer_1E0A
+end
+
+.layer layer_1DFA
+instr FONT00_INSTR_EXPLOSION_0
+rjump layer_1E02
+
+.layer layer_1DFE
+transpose 42
+instr FONT00_INSTR_FLAME_THUNDER
+.layer layer_1E02
+env envelope_65FC, 200
+notedv PITCH_DF4, 0x0, 110
+end
+
+.layer layer_1E0A
+instr FONT00_INSTR_POTTERY_ELECTRIC
+notedv PITCH_G3, 0x32, 50
+end
+
+.channel env_bomb_rebound
+ldlayer 0, layer_1E14
+end
+
+.layer layer_1E14
+instr FONT00_INSTR_SLAM_HEAVY
+env envelope_6660, 251
+legato
+portamento 0x85, 48, 255
+notedv PITCH_C3, 0x4, 95
+notedv PITCH_BF3, 0x5, 95
+end
+
+.channel env_water_drip
+instr FONT00_INSTR_WATER_DRIP
+env envelope_6624
+releaserate 201
+ldi 20
+stio 1
+panweight 0
+ldlayer 0, layer_1E3C
+ldlayer 1, layer_1E57
+ldlayer 2, layer_1E74
+end
+
+.layer layer_1E3C
+notepan 74
+call layer_fn_1E7F
+notepan 84
+call layer_fn_1E88
+notepan 89
+call layer_fn_1E91
+notepan 69
+call layer_fn_1E96
+notepan 78
+call layer_fn_1E9F
+rjump layer_1E3C
+
+.layer layer_1E57
+ldelay 0x44
+notepan 34
+call layer_fn_1E9F
+notepan 44
+call layer_fn_1E96
+notepan 54
+call layer_fn_1E91
+notepan 47
+call layer_fn_1E88
+notepan 41
+call layer_fn_1E7F
+rjump layer_1E57
+
+.layer layer_1E74
+call layer_fn_1EA8
+lldelay 0x64
+call layer_fn_1E7F
+rjump layer_1E57
+
+.layer layer_fn_1E7F
+notedv PITCH_C4, 0x172, 98
+notedv PITCH_AF3, 0x10C, 56
+end
+
+.layer layer_fn_1E88
+notedv PITCH_A3, 0x113, 65
+notedv PITCH_BF3, 0x140, 92
+end
+
+.layer layer_fn_1E91
+notedv PITCH_B3, 0x159, 76
+end
+
+.layer layer_fn_1E96
+notedv PITCH_G3, 0xD7, 98
+notedv PITCH_D4, 0x1CC, 106
+end
+
+.layer layer_fn_1E9F
+notedv PITCH_A3, 0x120, 92
+notedv PITCH_BF3, 0x13B, 88
+end
+
+.layer layer_fn_1EA8
+stereo 20
+end
+
+.channel env_fire_crackle
+instr FONT00_INSTR_FIRE_COW
+gain 10
+ldlayer 0, layer_1EB3
+end
+
+.layer layer_1EB3
+legato
+.layer layer_1EB4
+notedv PITCH_BF3, 32700, 100
+rjump layer_1EB4
+
+.channel env_lava_bubbling
+panweight 48
+ldlayer 0, layer_1EC3
+ldlayer 1, layer_1ED4
+end
+
+.layer layer_1EC3
+instr FONT00_INSTR_LAVA
+legato
+portamento 0x85, 32, 200
+.layer layer_1ECA
+notedv PITCH_A3, 500, 105
+notedv PITCH_F3, 500, 105
+rjump layer_1ECA
+
+.layer layer_1ED4
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_667C, 221
+.layer layer_1EDA
+portamento 0x81, 27, 255
+notedv PITCH_F2, 0x190, 65
+portamento 0x81, 27, 255
+notedv PITCH_F4, 0x2BC, 65
+rjump layer_1EDA
+
+.channel env_flame_jet
+ldlayer 0, layer_1EF0
+end
+
+.layer layer_1EF0
+instr FONT00_INSTR_FLAME_THUNDER
+releaserate 240
+legato
+portamento 1, 24, 40
+.layer layer_1EF9
+notedv PITCH_F3, 32700, 100
+rjump layer_1EF9
+
+.channel env_flame_wall
+ldlayer 0, layer_1F03
+end
+
+.layer layer_1F03
+instr FONT00_INSTR_FLAME_THUNDER
+env envelope_667C, 240
+legato
+portamento 0x85, 32, 255
+notedv PITCH_C4, 0x60, 100
+.layer layer_1F11
+notedv PITCH_B3, 0x60, 100
+rjump layer_1F11
+
+.channel env_block_lock
+ldlayer 0, layer_1F1C
+end
+
+.layer layer_1F1A
+transpose -4
+
+.layer layer_1F1C
+instr FONT00_INSTR_BLOCK_LOCK
+releaserate 241
+notedv PITCH_GF4, 0x6, 110
+notedv PITCH_EF3, 0x64, 110
+end
+
+.channel env_door_metal_open_unused
+ldlayer 0, layer_1F2B
+end
+
+.layer layer_1F2B
+instr FONT00_INSTR_MECH_ROTATE
+releaserate 240
+legato
+portamento 0x85, 25, 255
+notedv PITCH_D3, 0x28, 75
+.layer layer_1F37
+notedv PITCH_E3, 0x141, 75
+rjump layer_1F37
+
+.channel env_door_slide_unlock_unused
+ldlayer 0, layer_1F43
+end
+
+.layer layer_1F41
+transpose -6
+
+.layer layer_1F43
+instr FONT00_INSTR_SLAM_LIGHT
+releaserate 241
+notedv PITCH_A3, 0x5E, 95
+end
+
+.channel env_block_shake
+instr FONT00_INSTR_BLOCK_LOCK
+env envelope_6660
+ldlayer 0, layer_1F57
+ldlayer 1, layer_1F5F
+end
+
+.layer layer_1F57
+portamento 0x81, 43, 200
+notedv PITCH_C3, 0x14, 110
+end
+
+.layer layer_1F5F
+instr FONT00_INSTR_EXPLOSION_0
+notedv PITCH_A2, 0x14, 100
+end
+
+.channel env_crate_break
+gain 10
+ldlayer 0, layer_1F6E
+ldlayer 1, layer_1F7B
+end
+
+.layer layer_1F6E
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_6610, 251
+notedv PITCH_C5, 0xF, 94
+notedv PITCH_EF4, 0x60, 99
+end
+
+.layer layer_1F7B
+instr FONT00_INSTR_STICK_ATTACK
+env envelope_65E8, 180
+notedv PITCH_GF4, 0x8, 92
+notedv PITCH_EF4, 0x6, 85
+notedv PITCH_BF3, 0x5, 94
+notedv PITCH_GF3, 0xA, 89
+notedv PITCH_BF2, 0x50, 95
+end
+
+.channel env_switch_hammer
+ldlayer 0, layer_1F98
+ldlayer 1, layer_1FA2
+end
+
+.layer layer_1F98
+instr FONT00_INSTR_BLOCK_LOCK
+notedvg PITCH_DF5, 0x12, 95, 127
+notedv PITCH_DF4, 0x41, 95
+end
+
+.layer layer_1FA2
+instr FONT00_INSTR_STONE_STRIKE
+notedv PITCH_C4, 0x12, 80
+notedv PITCH_C3, 0x41, 80
+end
+
+.channel env_lava_bubbling_eerie
+panweight 48
+ldlayer 0, layer_1FB4
+ldlayer 1, layer_1FC5
+end
+
+.layer layer_1FB4
+instr FONT00_INSTR_LAVA
+legato
+portamento 0x85, 38, 200
+.layer layer_1FBB
+notedv PITCH_EF4, 0x19A, 110
+notedv PITCH_B3, 0x17C, 110
+rjump layer_1FBB
+
+.layer layer_1FC5
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_667C, 221
+.layer layer_1FCB
+portamento 0x81, 32, 255
+notedv PITCH_B2, 0x136, 80
+portamento 0x81, 32, 255
+notedv PITCH_B4, 0x226, 80
+rjump layer_1FCB
+
+.channel env_fence_raise
+ldlayer 0, layer_1FF1
+ldlayer 1, layer_1FE4
+end
+
+.layer layer_1FE4
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_664C, 240
+notedv PITCH_F5, 0x3, 70
+notedv PITCH_F3, 0x4, 64
+end
+
+.layer layer_1FF1
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+notedvg PITCH_D2, 0x3, 100, 127
+notedv PITCH_E3, 0x30, 100
+end
+
+.channel env_horse_ganon_neigh
+instr FONT00_INSTR_HORSE_VOCALS
+ldlayer 0, layer_2003
+end
+
+.layer layer_2003
+legato
+portamento 0x85, 38, 127
+notedv PITCH_D4, 0x50, 110
+notedv PITCH_G3, 0x73, 110
+end
+
+.channel env_horse_ganon_snort
+ldlayer 0, layer_2013
+end
+
+.layer layer_2013
+instr FONT00_INSTR_HORSE_VOCALS
+transpose 48
+legato
+portamento 0x85, 32, 255
+notedv PITCH_BF3, 0x6, 85
+notedv PITCH_EF3, 0x10, 85
+notedv PITCH_A2, 0x73, 85
+end
+
+.channel env_phantom_warp
+ldlayer 0, layer_2065
+ldlayer 1, layer_203C
+vibfreq 255
+vibdepthgrad 50, 80, 100
+ldi 255
+call delay_varyingvol
+vibdepthgrad 80, 10, 100
+end
+
+.layer layer_203C
+instr FONT00_INSTR_FLAME_THUNDER
+env envelope_6694, 231
+legato
+portamento 0x85, 3, 255
+notedv PITCH_F2, 0x60, 100
+notedv PITCH_C4, 0x96, 100
+nolegato
+legato
+noportamento
+env envelope_66EC, 231
+portamento 0x81, 15, 255
+notedv PITCH_C4, 0xC8, 100
+end
+
+.layer layer_unused_205E
+transpose -30
+instr FONT00_INSTR_OCARINA_0
+jump layer_2069
+
+.layer layer_2065
+transpose 12
+instr FONT00_INSTR_WARP
+.layer layer_2069
+env envelope_6688, 251
+legato
+portamento 0x85, 15, 255
+notedv PITCH_F3, 0x60, 74
+notedv PITCH_C5, 0xC8, 74
+notedv PITCH_A5, 0x96, 74
+end
+
+.channel env_witch_warp
+ldlayer 0, layer_20A3
+ldlayer 1, layer_208C
+ldlayer 2, layer_209C
+vibfreq 255
+vibdepth 50
+end
+
+.layer layer_208C
+instr FONT00_INSTR_FLAME_THUNDER
+env envelope_667C, 211
+legato
+portamento 0x85, 3, 255
+.layer layer_2097
+notedv PITCH_F2, 0x60, 100
+rjump layer_2097
+
+.layer layer_209C
+transpose -18
+instr FONT00_INSTR_OCARINA_0
+jump layer_20A7
+
+.layer layer_20A3
+instr FONT00_INSTR_WARP
+transpose 12
+.layer layer_20A7
+env envelope_667C, 211
+legato
+portamento 0x85, 15, 255
+.layer layer_20B0
+notedv PITCH_F3, 0x60, 74
+rjump layer_20B0
+
+.channel env_water_fountain
+ldlayer 0, layer_20BC
+ldlayer 1, layer_20C7
+end
+
+.layer layer_20BC
+instr FONT00_INSTR_WATER_FLOWING
+transpose 48
+.layer layer_20C0
+legato
+.layer layer_20C1
+notedv PITCH_GF4, 32700, 64
+rjump layer_20C1
+
+.layer layer_20C7
+instr FONT00_INSTR_WATER_FLOWING
+rjump layer_20C0
+
+.channel env_horse_child_trot
+instr FONT00_INSTR_HORSE_GALLOP
+releaserate 245
+ldlayer 0, layer_20D3
+end
+
+.layer layer_20D3
+notedv PITCH_C4, 0x9, 110
+end
+
+.channel env_horse_child_gallop
+instr FONT00_INSTR_HORSE_GALLOP
+ldlayer 0, layer_20DD
+end
+
+.layer layer_20DD
+notedv PITCH_E4, 0x18, 110
+end
+
+.channel env_horse_child_neigh
+instr FONT00_INSTR_HORSE_VOCALS
+ldlayer 0, layer_20E7
+end
+
+.layer layer_20E7
+notedv PITCH_E4, 0x91, 110
+end
+
+.channel env_horse_child_snort
+ldlayer 0, layer_20F0
+end
+
+.layer layer_20F0
+transpose 52
+jump layer_1AB9
+
+.channel env_barrier_node_fadeout
+gain 15
+ldlayer 0, layer_20FE
+ldlayer 1, layer_210B
+end
+
+.layer layer_20FE
+instr FONT00_INSTR_FAIRY
+env envelope_67F4, 221
+transpose 24
+notedv PITCH_C4, 0xF8, 75
+end
+
+.layer layer_210B
+instr FONT00_INSTR_WARP
+env envelope_67F4, 221
+transpose 36
+notedv PITCH_C4, 0xF8, 100
+end
+
+.channel env_barrier_dispell
+instr FONT00_INSTR_WARP
+ldlayer 0, layer_2130
+ldlayer 1, layer_2124
+ldlayer 2, layer_2147
+end
+
+.layer layer_2124
+transpose 27
+rjump layer_2132
+
+.layer layer_unused_2128
+transpose 33
+env envelope_65FC, 240
+rjump layer_2132
+
+.layer layer_2130
+transpose 24
+.layer layer_2132
+legato
+portamento 0x81, 40, 255
+.layer layer_2137
+noteldv PITCH_D4, 0x30, 80
+rjump layer_2137
+
+.layer layer_unused_213D
+transpose 32
+instr FONT00_INSTR_SHIMMER
+env envelope_65FC, 240
+rjump layer_214F
+
+.layer layer_2147
+transpose 48
+.layer layer_2149
+instr FONT00_INSTR_SHIMMER
+env envelope_66FC, 240
+.layer layer_214F
+legato
+.layer layer_2150
+notedv PITCH_C5, 0x7D00, 50
+rjump layer_2150
+
+.channel env_tree_cut
+ldlayer 0, layer_215D
+ldlayer 1, layer_216D
+end
+
+.layer layer_215D
+ldelay 0x6
+legato
+instr FONT00_INSTR_STEP_GRASS
+portamento 0x85, 32, 255
+notedv PITCH_A3, 0x18, 80
+notedv PITCH_G2, 0x32, 80
+end
+
+.layer layer_216D
+instr FONT00_INSTR_WOOD_BREAK
+notedvg PITCH_E3, 0xA, 93, 127
+notedv PITCH_GF2, 0x1F, 90
+end
+
+.channel env_volcano_erupt
+panweight 96
+ldlayer 0, layer_2185
+ldlayer 1, layer_2190
+ldlayer 2, layer_2183
+end
+
+.layer layer_2183
+transpose -6
+
+.layer layer_2185
+instr FONT00_INSTR_MECH_CHARGE
+releaserate 221
+legato
+.layer layer_218A
+notedv PITCH_F4, 0x7D00, 90
+rjump layer_218A
+
+.layer layer_2190
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_6674, 221
+.layer layer_2196
+notepan 64
+notedv PITCH_B4, 0x50, 85
+notepan 45
+notedv PITCH_G4, 0x50, 85
+notepan 97
+notedv PITCH_F4, 0x40, 85
+notepan 74
+notedv PITCH_A4, 0x31, 85
+notepan 82
+notedv PITCH_D5, 0x3A, 85
+notepan 37
+notedv PITCH_A4, 0x25, 85
+notepan 54
+notedv PITCH_F4, 0x3D, 85
+notepan 29
+notedv PITCH_C5, 0x20, 85
+rjump layer_2196
+
+.channel env_guillotine_rise
+ldlayer 0, layer_21C7
+ldlayer 1, layer_21CD
+end
+
+.layer layer_21C7
+instr FONT00_INSTR_CHAIN
+notedv PITCH_E4, 0x18, 80
+end
+
+.layer layer_21CD
+instr FONT00_INSTR_SWORD_DRAW
+portamento 0x81, 28, 255
+notedv PITCH_EF3, 0x18, 95
+end
+
+.channel env_guillotine_fall
+ldlayer 0, layer_21ED
+ldlayer 1, layer_21DE
+end
+
+.layer layer_21DE
+instr FONT00_INSTR_EXPLOSION_0
+portamento 0x81, 39, 255
+notedv PITCH_AF2, 0x8, 70
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_E3, 0x8, 90
+end
+
+.layer layer_21ED
+instr FONT00_INSTR_CHAIN
+notedv PITCH_A4, 0x6, 80
+instr FONT00_INSTR_SWORD_DRAW
+portamento 0x81, 38, 255
+notedv PITCH_F3, 0xE, 95
+end
+
+.channel env_scythe_spin
+ldlayer 0, layer_2200
+end
+
+.layer layer_2200
+instr FONT00_INSTR_MECH_ROTATE
+releaserate 240
+.layer layer_2204
+portamento 0x81, 27, 255
+notedv PITCH_A2, 0x40, 72
+rjump layer_2204
+
+.channel env_guillotine_chain
+instr FONT00_INSTR_CHAIN
+ldlayer 0, layer_221A
+ldlayer 1, layer_2216
+end
+
+.layer layer_2216
+instr FONT00_INSTR_CHAIN_RETRACT
+transpose -2
+
+.layer layer_221A
+legato
+portamento 1, 40, 116
+.layer layer_221F
+notedv PITCH_G4, 32700, 76
+rjump layer_221F
+
+.channel env_plant_break
+ldlayer 0, layer_2232
+ldlayer 1, layer_222C
+end
+
+.layer layer_222C
+instr FONT00_INSTR_EXPLOSION_0
+notedv PITCH_G3, 0x14, 100
+end
+
+.layer layer_2232
+instr FONT00_INSTR_STEP_GRASS
+notedvg PITCH_E3, 0x6, 90, 127
+notedvg PITCH_BF3, 0x6, 90, 127
+notedv PITCH_E4, 0x2A, 90
+end
+
+.channel env_ship_bell
+instr FONT00_INSTR_FAIL_BELLS
+env envelope_6624
+ldi 32
+stio 1
+ldlayer 0, layer_2253
+ldlayer 1, layer_224F
+end
+
+.layer layer_224F
+transpose 60
+rjump layer_2257
+
+.layer layer_2253
+transpose 48
+ldelay 0x5
+.layer layer_2257
+notedv PITCH_A3, 0x9, 80
+notedv PITCH_GF3, 0x53, 80
+ldelay 0x64
+rjump layer_2257
+
+.channel env_flag_flutter
+ldi 96
+stseq 0, chan_2287+1
+.channel chan_2267
+instr FONT00_INSTR_CLOAK
+env envelope_66EC
+releaserate 231
+ldi 4
+stio 6
+ldlayer 0, layer_2298
+.channel chan_2274
+rand 31
+stseq 14, layer_2298+1
+stseq 14, chan_2291+1
+stseq 45, layer_2298+2
+rand 8
+subio 6
+and 7
+.channel chan_2287
+stseq 96, layer_2298
+ldio 6
+sub 252
+and 4
+stio 6
+.channel chan_2291
+ldi 1
+call delay_varyingvol
+rjump chan_2274
+
+.layer layer_2298
+notedv PITCH_C4, 0x47, 80
+rjump layer_2298
+
+.channel env_unused
+ldlayer 0, layer_1F43
+ldlayer 1, layer_1F1C
+end
+
+.channel env_rock_break
+gain 18
+ldlayer 0, layer_22AA
+end
+
+.layer layer_22AA
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_6624, 246
+notedvg PITCH_EF4, 0x9, 105, 192
+env envelope_6610, 220
+notedv PITCH_B2, 0x0, 105
+end
+
+.channel env_phantom_warp2
+instr FONT00_INSTR_OCARINA_0
+env envelope_6674
+ldlayer 0, layer_22CB
+vibdepth 255
+vibfreqgrad 4, 64, 100
+end
+
+.layer layer_22CB
+notedv PITCH_D2, 0x1C2, 80
+end
+
+.channel env_phantom_warp_loop
+instr FONT00_INSTR_OCARINA_0
+env envelope_6674
+ldlayer 0, layer_22DF
+vibdepth 255
+vibfreqgrad 2, 7, 25
+end
+
+.layer layer_22DF
+legato
+.layer layer_22E0
+notedv PITCH_C2, 32700, 80
+rjump layer_22E0
+
+.channel env_coffin_open
+ldlayer 0, layer_22EA
+end
+
+.layer layer_22EA
+instr FONT00_INSTR_DOOR_WOOD
+notedv PITCH_C3, 0x13, 105
+instr FONT00_INSTR_CREAK
+notedv PITCH_B1, 0x49, 103
+end
+
+.channel env_coffin_close
+instr FONT00_INSTR_STICK_ATTACK
+ldlayer 0, layer_22FB
+end
+
+.layer layer_22FB
+notedv PITCH_DF2, 0x8, 100
+notedv PITCH_D3, 0x18, 100
+end
+
+.channel env_fan_spin
+ldlayer 0, layer_230B
+ldlayer 1, layer_2309
+end
+
+.layer layer_2309
+transpose 5
+
+.layer layer_230B
+legato
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_6674, 200
+portamento 1, 56, 127
+.layer layer_2316
+notedv PITCH_B5, 32700, 85
+rjump layer_2316
+
+.channel env_trap_wall_slide
+ldlayer 0, layer_2327
+ldlayer 1, layer_2325
+gain 24
+end
+
+.layer layer_2325
+transpose 4
+
+.layer layer_2327
+instr FONT00_INSTR_CREAK
+portamento 0x84, 19, 127
+.layer layer_232D
+notedv PITCH_D1, 0x9, 110
+rjump layer_232D
+
+.channel env_door_slide_lock
+instr FONT00_INSTR_MECH_ROTATE
+ldlayer 0, layer_2338
+end
+
+.layer layer_2338
+portamento 0x81, 32, 175
+notedv PITCH_B3, 0x30, 80
+end
+
+.channel env_door_slide_unlock
+instr FONT00_INSTR_MECH_ROTATE
+ldlayer 0, layer_2346
+end
+
+.layer layer_2346
+portamento 0x81, 38, 175
+notedv PITCH_F3, 0x30, 80
+end
+
+.channel env_flame_jet_low
+gain 10
+ldlayer 0, layer_2357
+ldlayer 1, layer_2366
+end
+
+.layer layer_2357
+instr FONT00_INSTR_FIRE_COW
+releaserate 221
+legato
+portamento 0x81, 52, 255
+.layer layer_2360
+notedv PITCH_F4, 0xC8, 110
+rjump layer_2360
+
+.layer layer_2366
+instr FONT00_INSTR_FLAME_THUNDER
+releaserate 221
+legato
+portamento 0x81, 16, 255
+.layer layer_236F
+notedv PITCH_F2, 0x7F, 72
+rjump layer_236F
+
+.channel env_ganon_block_sink
+ldlayer 0, layer_237B
+ldlayer 1, layer_2185
+end
+
+.layer layer_237B
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_6660, 247
+.layer layer_2381
+notedv PITCH_F5, 0x3, 95
+notedv PITCH_F4, 0x5, 95
+rjump layer_2381
+
+.channel env_crowd_chatter
+panweight 0
+ldlayer 0, layer_2398
+ldlayer 1, layer_2392
+end
+
+.layer layer_2392
+transpose 1
+notepan 0
+rjump layer_239A
+
+.layer layer_2398
+notepan 127
+.layer layer_239A
+instr FONT00_INSTR_CHATTER
+env envelope_66F4, 225
+.layer layer_23A0
+notedv PITCH_C4, 0x7D00, 64
+rjump layer_23A0
+
+.channel env_water_change
+ldlayer 0, layer_23CB
+ldlayer 1, layer_23B1
+end
+
+.layer layer_23AD
+transpose 18
+rjump layer_23B3
+
+.layer layer_23B1
+transpose 11
+.layer layer_23B3
+instr FONT00_INSTR_WATER_BUBBLES
+rjump layer_23BD
+
+.layer layer_23B7
+instr FONT00_INSTR_WATER_BUBBLES
+env envelope_6824, 225
+.layer layer_23BD
+releaserate 225
+.layer layer_23BF
+notedv PITCH_C2, 0x7D00, 70
+rjump layer_23BF
+
+.layer layer_23C5
+transpose 6
+rjump layer_23CB
+
+.layer layer_23C9
+transpose -2
+
+.layer layer_23CB
+instr FONT00_INSTR_SLIDE_LINK
+releaserate 225
+.layer layer_23CF
+notedv PITCH_F3, 0x7D00, 74
+rjump layer_23CF
+
+.channel env_fairy_hide
+ldlayer 0, layer_23D9
+end
+
+.layer layer_23D9
+instr FONT00_INSTR_FAIRY_MAGIC
+env envelope_66B8, 251
+legato
+portamento 0x85, 27, 255
+notedv PITCH_F5, 0x9, 65
+notedv PITCH_A4, 0x2C, 65
+end
+
+.channel env_ladder_land
+ldlayer 1, layer_14A4
+ldlayer 0, layer_23F2
+end
+
+.layer layer_23F2
+instr FONT00_INSTR_STICK_ATTACK
+transpose 48
+notedv PITCH_EF2, 0x5, 88
+instr FONT00_INSTR_STONE_STRIKE
+transpose 0
+notedv PITCH_A3, 0xC, 50
+end
+
+.channel env_web_bend
+instr FONT00_INSTR_CLOTH_TEAR
+env envelope_6688
+ldlayer 0, layer_240A
+end
+
+.layer layer_240A
+legato
+portamento 0x85, 24, 255
+notedv PITCH_F2, 0x18, 100
+notedv PITCH_AF2, 0x30, 100
+end
+
+.channel env_web_break
+instr FONT00_INSTR_CLOTH_TEAR
+env envelope_6688
+ldlayer 0, layer_2422
+ldlayer 1, layer_2432
+end
+
+.layer layer_2422
+legato
+ldelay 0x28
+portamento 0x85, 58, 255
+noteldv PITCH_G2, 0x12, 105
+noteldv PITCH_G4, 0x1E, 105
+end
+
+.layer layer_2432
+portamento 0x81, 20, 255
+notedv PITCH_B2, 0x60, 100
+end
+
+.channel env_unused2
+ldlayer 0, layer_2451
+ldlayer 1, layer_2445
+vibfreq 220
+vibdepth 53
+end
+
+.layer layer_2445
+instr FONT00_INSTR_FLAME_THUNDER
+env envelope_667C, 247
+legato
+.layer layer_244C
+notedv PITCH_A1, 0x60, 108
+rjump layer_244C
+
+.layer layer_2451
+transpose -18
+instr FONT00_INSTR_OCARINA_0
+env envelope_667C, 247
+legato
+.layer layer_245A
+notedv PITCH_EF3, 0x60, 90
+rjump layer_245A
+
+.channel env_door_jabu_open
+ldlayer 0, layer_2466
+ldlayer 1, layer_2475
+end
+
+.layer layer_2466
+instr FONT00_INSTR_CLOTH_TEAR
+env envelope_6694, 251
+portamento 0x81, 10, 255
+noteldv PITCH_G2, 0x24, 82
+end
+
+.layer layer_2475
+instr FONT00_INSTR_STEP_WATER
+portamento 0x81, 8, 255
+noteldv PITCH_C2, 0x24, 105
+end
+
+.channel env_door_jabu_close
+ldlayer 0, layer_2487
+ldlayer 1, layer_2496
+end
+
+.layer layer_2487
+instr FONT00_INSTR_CLOTH_TEAR
+env envelope_6694, 251
+portamento 0x81, 22, 255
+noteldv PITCH_C1, 0x24, 90
+end
+
+.layer layer_2496
+instr FONT00_INSTR_STEP_WATER
+portamento 0x81, 20, 255
+noteldv PITCH_C1, 0x24, 95
+end
+
+.channel env_door_wood_creak_unused
+ldlayer 0, layer_24A7
+end
+
+.layer layer_24A5
+transpose 8
+
+.layer layer_24A7
+instr FONT00_INSTR_CREAK
+notedv PITCH_B1, 0x0, 103
+end
+
+.channel env_gate_open
+ldlayer 0, layer_24B1
+end
+
+.layer layer_24B1
+instr FONT00_INSTR_MECH_ROTATE
+releaserate 240
+notedv PITCH_E3, 0x3C, 75
+.layer layer_24B8
+notedv PITCH_GF3, 0x38, 75
+rjump layer_24B8
+
+.channel env_bottle_scoop_water
+instr FONT00_INSTR_WATER_SPLISH
+ldlayer 0, layer_24C3
+end
+
+.layer layer_24C3
+portamento 0x82, 39, 127
+notedv PITCH_A3, 0x7F, 100
+end
+
+.channel env_fish_flop
+instr FONT00_INSTR_WATER_SPLISH
+cdelay 7
+ldlayer 0, layer_24D2
+end
+
+.layer layer_24D2
+notedv PITCH_A4, 0x7, 76
+instr FONT00_INSTR_STEP_JABU
+portamento 0x81, 39, 127
+notedv PITCH_B5, 0x18, 100
+end
+
+.channel env_scarecrow_sway
+ldlayer 0, layer_24E9
+
+.channel chan_fn_24E2
+instr FONT00_INSTR_STEP_GRASS
+vibdepth 36
+vibfreq 255
+end
+
+.layer layer_24E9
+notedv PITCH_F3, 0xA, 90
+notedv PITCH_C4, 0x1E, 90
+end
+
+.channel env_scarecrow_spin
+ldlayer 0, layer_24F7
+call chan_fn_24E2
+end
+
+.layer layer_24F7
+notedv PITCH_D4, 0xA, 100
+portamento 0x81, 43, 255
+notedv PITCH_E3, 0x5A, 100
+end
+
+.channel env_bottle_open
+ldlayer 0, layer_2506
+end
+
+.layer layer_2506
+instr FONT00_INSTR_WHIP_CORK
+transpose 48
+notedv PITCH_A3, 0x0, 110
+end
+
+.channel env_jabu_inhale
+ldlayer 0, layer_2517
+ldlayer 1, layer_2528
+panweight 48
+end
+
+.layer layer_2517
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_6674, 232
+legato
+portamento 0x85, 46, 255
+.layer layer_2522
+notedv PITCH_C5, 0x3E8, 105
+rjump layer_2522
+
+.layer layer_2528
+instr FONT00_INSTR_ROAR_BARK
+notedv PITCH_C3, 0x8, 105
+notedv PITCH_G2, 0x0, 105
+end
+
+.channel env_stone_resonate
+ldlayer 0, layer_2545
+ldlayer 1, layer_2538
+end
+
+.layer layer_2538
+instr FONT00_INSTR_FAIRY
+env envelope_67D8, 240
+legato
+.layer layer_253F
+notedv PITCH_AF3, 0x7D00, 32
+rjump layer_253F
+
+.layer layer_2545
+instr FONT00_INSTR_WARP
+env envelope_67E4, 240
+transpose 15
+legato
+.layer layer_254E
+notedv PITCH_A4, 0x7D00, 64
+rjump layer_254E
+
+.channel env_triforce_flash
+ldlayer 0, layer_255B
+ldlayer 1, layer_2568
+end
+
+.layer layer_255B
+transpose 24
+instr FONT00_INSTR_SYNTH_BUZZ
+env envelope_67CC, 241
+notedv PITCH_EF5, 0x120, 42
+end
+
+.layer layer_2568
+jump layer_210B
+
+.channel env_ruto_trip
+call player_slip_jabu
+ldlayer 1, layer_2572
+end
+
+.layer layer_2572
+instr FONT00_INSTR_STEP_JABU
+portamento 0x84, 27, 255
+notedv PITCH_A3, 0xF, 93
+notedv PITCH_F3, 0x10, 93
+notedv PITCH_D3, 0x11, 93
+end
+
+.channel env_fairy_fly
+instr FONT00_INSTR_FAIRY_MAGIC
+env envelope_67D8
+panweight 0
+ldlayer 0, layer_258D
+end
+
+.layer layer_258D
+legato
+portamento 0x81, 48, 255
+.layer layer_2592
+notedv PITCH_D5, 0x20, 50
+rjump layer_2592
+
+.channel env_fairy_crash
+ldlayer 0, layer_25A7
+ldlayer 1, layer_25BC
+cdelay 4
+vibfreq 127
+vibdepthgrad 25, 80, 100
+delay 0x32
+end
+
+.layer layer_25A7
+instr FONT00_INSTR_STEP_WOOD
+releaserate 210
+notedv PITCH_A3, 0x4, 95
+instr FONT00_INSTR_OCARINA_0
+env envelope_6674, 235
+portamento 0x85, 7, 255
+notedv PITCH_G3, 0x38, 70
+end
+
+.layer layer_25BC
+instr FONT00_INSTR_DOOR_WOOD
+releaserate 216
+notedv PITCH_C3, 0x4, 95
+jump layer_23D9
+
+.channel env_spear_ready
+ldlayer 0, layer_25CA
+end
+
+.layer layer_25CA
+instr FONT00_INSTR_STICK_ATTACK
+transpose 48
+releaserate 245
+notedv PITCH_AF2, 0xD, 90
+end
+
+.channel env_unused3
+ldlayer 0, layer_25EC
+ldlayer 1, layer_25DB
+end
+
+.layer layer_25DB
+instr FONT00_INSTR_WATER_BUBBLES
+env envelope_66F4, 160
+legato
+portamento 0x85, 26, 255
+.layer layer_25E6
+notedv PITCH_GF3, 0x3E8, 80
+rjump layer_25E6
+
+.layer layer_25EC
+instr FONT00_INSTR_WATER_FLOWING
+env envelope_66F4, 160
+transpose 48
+legato
+portamento 0x85, 36, 255
+.layer layer_25F9
+notedv PITCH_F4, 0x3E8, 75
+rjump layer_25F9
+
+.channel env_water_drip_unused
+ldlayer 0, layer_2608
+ldlayer 1, layer_2606
+end
+
+.layer layer_2606
+transpose 5
+
+.layer layer_2608
+instr FONT00_INSTR_WATER_DRIP
+env envelope_66F4, 211
+legato
+portamento 0x81, 27, 255
+.layer layer_2613
+notedv PITCH_G4, 500, 80
+rjump layer_2613
+
+.channel env_windmill_gear
+instr FONT00_INSTR_CREAK
+panweight 64
+ldlayer 0, layer_2621
+end
+
+.layer layer_2621
+portamento 0x83, 10, 255
+.layer layer_2625
+notedv PITCH_C2, 0x20, 96
+rjump layer_2625
+
+.channel env_bush_sway
+ldlayer 0, layer_2638
+ldlayer 1, layer_2631
+end
+
+.layer layer_2631
+instr FONT00_INSTR_CREAK
+notedv PITCH_E3, 0x18, 65
+transpose 18
+
+.layer layer_2638
+instr FONT00_INSTR_STEP_GRASS
+env envelope_6688, 251
+notedv PITCH_B2, 0xE, 95
+notedv PITCH_C4, 0x14, 100
+notedv PITCH_BF2, 0x11, 102
+notedv PITCH_BF3, 0x50, 103
+end
+
+.channel env_horse_demo_gallop
+instr FONT00_INSTR_HORSE_GALLOP
+ldlayer 0, layer_2651
+end
+
+.layer layer_2651
+notedv PITCH_C4, 0x27, 110
+rjump layer_2651
+
+.channel env_elevator_geared_move
+instr FONT00_INSTR_MECH_CHARGE
+gain 20
+ldlayer 0, layer_265E
+end
+
+.layer layer_265E
+transpose 48
+legato
+.layer layer_2661
+notedv PITCH_E3, 0x7D00, 100
+rjump layer_2661
+
+.channel env_elevator_geared_stop
+ldlayer 0, layer_2671
+ldlayer 1, layer_2677
+ldlayer 2, layer_2685
+end
+
+.layer layer_2671
+instr FONT00_INSTR_SLAM_LIGHT
+notedv PITCH_F3, 0x40, 95
+end
+
+.layer layer_2677
+instr FONT00_INSTR_SLAM_GUNSHOT
+env envelope_66B0, 250
+portamento 0x81, 31, 200
+notedv PITCH_C3, 0x3C, 100
+end
+
+.layer layer_2685
+instr FONT00_INSTR_MECH_CHARGE
+transpose 48
+portamento 0x81, 39, 255
+notedv PITCH_GF2, 0x34, 96
+end
+
+.channel env_treasure_warp
+ldlayer 0, layer_269B
+ldlayer 1, layer_26B3
+ldlayer 2, layer_26C2
+end
+
+.layer layer_269B
+instr FONT00_INSTR_FAIRY
+env envelope_6694, 235
+portamento 0x83, 39, 255
+loop 7
+notedv PITCH_G4, 0x40, 64
+loopend
+portamento 0x81, 41, 255
+notedv PITCH_A4, 0x70, 64
+end
+
+.layer layer_26B3
+transpose 16
+instr FONT00_INSTR_WARP
+env envelope_6694, 235
+loop 7
+notedv PITCH_GF5, 0x40, 50
+loopend
+end
+
+.layer layer_26C2
+ldelay 0x109
+instr FONT00_INSTR_SYNTH
+env envelope_67CC, 235
+notedv PITCH_D3, 0x7F, 105
+end
+
+.channel env_door_unlock
+gain 20
+ldlayer 0, layer_26D8
+ldlayer 1, layer_26DE
+end
+
+.layer layer_26D8
+instr FONT00_INSTR_CHAIN
+notedv PITCH_GF4, 0x4C, 50
+end
+
+.layer layer_26DE
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_E2, 0x8, 84
+instr FONT00_INSTR_SWORD_SHEATHE
+notedv PITCH_DF4, 0x14, 105
+end
+
+.channel env_trap_blade_move
+ldlayer 0, layer_26F0
+ldlayer 1, layer_26FA
+end
+
+.layer layer_26F0
+instr FONT00_INSTR_SWORD_DRAW
+portamento 0x81, 12, 64
+notedv PITCH_BF2, 0x7F, 85
+end
+
+.layer layer_26FA
+instr FONT00_INSTR_CHAIN
+notedv PITCH_D3, 0x30, 81
+end
+
+.channel env_fairy_heal_old
+instr FONT00_INSTR_SHIMMER
+env envelope_66F4
+releaserate 221
+ldlayer 0, layer_2713
+ldlayer 1, layer_2711
+ldlayer 2, layer_271E
+end
+
+.layer layer_2711
+transpose 4
+
+.layer layer_2713
+legato
+portamento 0x81, 43, 255
+.layer layer_2718
+notedv PITCH_F4, 0x190, 48
+rjump layer_2718
+
+.layer layer_271E
+transpose 48
+env envelope_67D8, 221
+legato
+portamento 0x81, 50, 255
+.layer layer_2729
+notedv PITCH_C5, 0x190, 64
+rjump layer_2729
+
+.channel env_great_fairy_appear
+ldi 129
+.channel chan_2731
+stseq 0, layer_2745+1
+instr FONT00_INSTR_FAIRY
+env envelope_66FC
+releaserate 221
+ldlayer 0, layer_2743
+ldlayer 1, layer_2745
+end
+
+.layer layer_2743
+transpose 24
+
+.layer layer_2745
+portamento 0x81, 31, 255
+notedv PITCH_G3, 0xF0, 80
+end
+
+.channel env_great_fairy_vanish
+ldi 130
+rjump chan_2731
+
+.channel env_trap_eye_fire
+ldlayer 0, layer_2756
+end
+
+.layer layer_2756
+instr FONT00_INSTR_SYNTH
+env envelope_67CC, 245
+portamento 0x81, 19, 80
+notedv PITCH_AF3, 0x6E, 105
+end
+
+.channel env_gears_unused
+instr FONT00_INSTR_DOOR_METAL
+env envelope_6674
+panweight 72
+ldlayer 0, layer_276F
+end
+
+.layer layer_276F
+legato
+.layer layer_2770
+notedv PITCH_F3, 0x7D00, 88
+rjump layer_2770
+
+.channel env_wall_move_unused
+instr FONT00_INSTR_DOOR_METAL
+ldlayer 0, layer_2781
+ldlayer 1, layer_277F
+end
+
+.layer layer_277F
+transpose -6
+
+.layer layer_2781
+legato
+portamento 1, 15, 48
+.layer layer_2786
+notedv PITCH_E3, 32700, 75
+rjump layer_2786
+
+.channel env_treasure_flash
+ldlayer 0, layer_2790
+end
+
+.layer layer_2790
+instr FONT00_INSTR_WARP
+env envelope_6638, 251
+transpose 36
+notedv PITCH_D3, 0xD, 98
+notedv PITCH_D4, 0x64, 98
+end
+
+.channel env_windmill_blade
+instr FONT00_INSTR_CREAK
+ldlayer 0, layer_27A5
+end
+
+.layer layer_27A5
+legato
+transpose 48
+notedv PITCH_C2, 32700, 100
+rjump layer_27A5
+
+.channel env_grotto_exit
+rvrbidx 1
+
+.channel env_warp_unused
+ldi 129
+.channel chan_27B2
+stseq 0, layer_27D3+1
+panweight 64
+ldlayer 0, layer_27CC
+ldlayer 1, layer_27C8
+ldlayer 2, layer_27C2
+end
+
+.layer layer_27C2
+transpose 8
+notepan 104
+rjump layer_27CC
+
+.layer layer_27C8
+transpose 4
+notepan 24
+
+.layer layer_27CC
+instr FONT00_INSTR_WARP
+env envelope_66F4, 230
+legato
+.layer layer_27D3
+portamento 0x81, 58, 255
+.layer layer_27D7
+notedv PITCH_A5, 0x7D0, 75
+rjump layer_27D7
+
+.channel env_pot_break
+ldlayer 0, layer_27E4
+ldlayer 1, layer_27E8
+end
+
+.layer layer_27E4
+transpose 36
+rjump layer_27EA
+
+.layer layer_27E8
+transpose 48
+.layer layer_27EA
+instr FONT00_INSTR_POTTERY_ELECTRIC
+notedv PITCH_BF3, 0x0, 75
+end
+
+.channel env_pot_drop
+ldlayer 0, layer_27F7
+ldlayer 1, layer_998
+end
+
+.layer layer_27F7
+transpose 48
+jump layer_992
+
+.channel env_goddess_fly
+call chan_fn_2823
+ldlayer 0, layer_280A
+ldlayer 1, layer_2816
+vibfreq 128
+vibdepth 16
+end
+
+.layer layer_280A
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_6674, 245
+.layer layer_2810
+notedv PITCH_D5, 0x7D00, 60
+rjump layer_2810
+
+.layer layer_2816
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_66F4, 245
+legato
+.layer layer_281D
+notedv PITCH_DF4, 0x7D00, 75
+rjump layer_281D
+
+.channel chan_fn_2823
+gain 12
+ldi 25
+stio 1
+end
+
+.channel env_triforce_aura
+instr FONT00_INSTR_SHIMMER
+ldlayer 0, layer_2832
+ldlayer 1, layer_283C
+end
+
+.layer layer_2832
+env envelope_67D8, 230
+.layer layer_2836
+notedv PITCH_AF4, 0x7D00, 50
+rjump layer_2836
+
+.layer layer_283C
+transpose 48
+env envelope_67D8, 230
+.layer layer_2842
+notedv PITCH_A3, 0x7D00, 32
+rjump layer_2842
+
+.channel env_triforce_glow
+ldlayer 0, layer_2853
+ldlayer 1, layer_284F
+end
+
+.layer layer_284F
+transpose 16
+rjump layer_2855
+
+.layer layer_2853
+transpose 12
+.layer layer_2855
+instr FONT00_INSTR_WARP
+env envelope_66F4, 230
+legato
+.layer layer_285C
+notedv PITCH_F5, 0x7D00, 35
+rjump layer_285C
+
+.channel env_deku_tree_death
+gain 15
+ldlayer 0, layer_286D
+ldlayer 1, layer_287C
+end
+
+.layer layer_286B
+transpose 4
+
+.layer layer_286D
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_66FC, 170
+portamento 0x81, 32, 145
+notedv PITCH_D3, 0x244, 105
+end
+
+.layer layer_287C
+instr FONT00_INSTR_CLOTH_TEAR
+env envelope_66FC, 170
+portamento 0x81, 5, 145
+notedv PITCH_B0, 0x244, 110
+end
+
+.channel env_jabu_platform_rise
+ldi 129
+stseq 0, layer_28AA+1
+.channel chan_2891
+ldlayer 0, layer_28A3
+ldlayer 1, layer_289C
+vibfreq 111
+vibdepth 10
+end
+
+.layer layer_289C
+transpose -12
+instr FONT00_INSTR_OCARINA_0
+jump layer_28A5
+
+.layer layer_28A3
+instr FONT00_INSTR_FLAME_THUNDER
+.layer layer_28A5
+env envelope_667C, 231
+legato
+.layer layer_28AA
+portamento 0x81, 12, 25
+.layer layer_28AE
+notedv PITCH_D3, 0xCB2, 74
+rjump layer_28AE
+
+.channel env_jabu_platform_fall
+ldi 130
+stseq 0, layer_28AA+1
+rjump chan_2891
+
+.channel env_door_jabu_unlock
+ldi 129
+.channel chan_28BE
+stseq 0, layer_28D2+1
+instr FONT00_INSTR_SYNTH
+env envelope_6688
+ldlayer 0, layer_28D2
+ldlayer 1, layer_28D0
+delay 0x14
+end
+
+.layer layer_28D0
+instr FONT00_INSTR_STEP_WATER
+
+.layer layer_28D2
+portamento 0x81, 17, 255
+releaserate 251
+notedv PITCH_D1, 0x14, 80
+end
+
+.channel env_door_jabu_lock
+ldi 130
+rjump chan_28BE
+
+.channel env_door_time_stop
+ldlayer 0, layer_1B2E
+ldlayer 1, layer_1F1A
+end
+
+.channel env_stone_restore
+instr FONT00_INSTR_WARP
+ldlayer 0, layer_2913
+ldlayer 1, layer_2900
+ldlayer 2, layer_2922
+vibfreq 128
+vibdepthgrad 32, 0, 55
+ldi 1
+call delay_varyingvol
+vibdepth 0
+end
+
+.layer layer_2900
+instr FONT00_INSTR_FAIRY
+env envelope_67E4, 200
+portamento 0x81, 38, 180
+notedv PITCH_C4, 0x384, 32
+end
+
+.layer layer_290F
+transpose 27
+rjump layer_2915
+
+.layer layer_2913
+transpose 15
+.layer layer_2915
+env envelope_67E4, 200
+portamento 0x81, 50, 180
+notedv PITCH_C5, 0x384, 80
+end
+
+.layer layer_2922
+releaserate 200
+notedv PITCH_C3, 0x258, 64
+transpose 27
+env envelope_66F4, 221
+notedv PITCH_C5, 0x12C, 70
+end
+
+.channel env_medal_acquire
+ldlayer 0, layer_2937
+end
+
+.layer layer_2937
+instr FONT00_INSTR_SHIMMER
+env envelope_6808, 240
+transpose 48
+legato
+portamento 0x85, 46, 255
+notedv PITCH_GF4, 0x50, 80
+notedv PITCH_C4, 0xD2, 80
+.layer layer_294B
+notedv PITCH_C4, 0x113, 80
+rjump layer_294B
+
+.channel env_unused4
+ldlayer 0, layer_2958
+ldlayer 1, layer_54B
+end
+
+.layer layer_2958
+instr FONT00_INSTR_SLAM_GUNSHOT
+env envelope_66B0, 250
+portamento 0x83, 38, 200
+notedv PITCH_AF2, 0x3, 95
+notedvg PITCH_BF2, 0x9, 95, 100
+end
+
+.channel env_light_arrow_acquire
+ldlayer 0, layer_296E
+end
+
+.layer layer_296E
+instr FONT00_INSTR_SHIMMER
+env envelope_6800, 240
+transpose 48
+legato
+portamento 0x85, 32, 255
+notedv PITCH_F3, 0x50, 80
+notedv PITCH_G4, 0x50, 80
+notedv PITCH_G4, 0x208, 80
+notedv PITCH_C4, 0xD2, 80
+.layer layer_2989
+notedv PITCH_F3, 0x64, 80
+rjump layer_2989
+
+.channel env_earthquake
+ldlayer 0, layer_299C
+ldlayer 1, layer_2998
+ldlayer 2, layer_29AD
+end
+
+.layer layer_2998
+stereo 20
+
+.layer layer_299A
+transpose -6
+
+.layer layer_299C
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_66FC, 211
+legato
+portamento 0x81, 46, 255
+.layer layer_29A7
+notedv PITCH_A4, 0xC8, 77
+rjump layer_29A7
+
+.layer layer_29AD
+ldelay 0x64
+
+.layer layer_29AF
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_66FC, 221
+notedv PITCH_A2, 0xCF, 72
+.layer layer_29B9
+notedv PITCH_F3, 0x6F, 80
+notedv PITCH_C3, 0xA8, 84
+notedv PITCH_D3, 0x61, 68
+rjump layer_29B9
+
+.channel env_trap_crystal
+ldi 40
+stio 1
+ldlayer 0, layer_29E3
+ldlayer 1, layer_29D2
+ldlayer 2, layer_29D4
+end
+
+.layer layer_29D2
+transpose -4
+
+.layer layer_29D4
+instr FONT00_INSTR_SHIMMER
+env envelope_66F4, 241
+portamento 0x81, 39, 255
+notedv PITCH_EF3, 0xC6, 90
+end
+
+.layer layer_29E3
+ldelay 0xBC
+instr FONT00_INSTR_SYNTH
+portamento 0x81, 3, 32
+notedv PITCH_C2, 0x40, 105
+end
+
+.channel env_sage_warp
+instr FONT00_INSTR_WARP
+ldlayer 0, layer_29FC
+ldlayer 1, layer_2124
+ldlayer 2, layer_2A01
+end
+
+.layer layer_29FC
+transpose 30
+jump layer_2132
+
+.layer layer_2A01
+transpose 51
+jump layer_2149
+.layer layer_2A06
+instr FONT00_INSTR_EYE_OF_TRUTH
+releaserate 221
+portamento 0x84, 22, 127
+notedv PITCH_A4, 0x60, 85
+notedv PITCH_B4, 0x7F, 95
+end
+
+.channel env_sage_charge
+instr FONT00_INSTR_SHIMMER
+ldlayer 0, layer_2A27
+ldlayer 1, layer_2A36
+ldlayer 2, layer_2A3F
+vibdepth 40
+vibfreqgrad 148, 240, 100
+end
+
+.layer layer_2A27
+instr FONT00_INSTR_FLAME_THUNDER
+env envelope_66F4, 221
+portamento 0x81, 39, 255
+notedv PITCH_B5, 0x2E4, 95
+end
+
+.layer layer_2A36
+portamento 0x81, 27, 255
+notedv PITCH_B4, 0x2E4, 65
+end
+
+.layer layer_2A3F
+transpose 48
+releaserate 180
+portamento 0x81, 27, 255
+notedv PITCH_B4, 0x21C, 62
+transpose 0
+instr FONT00_INSTR_SLIDE_LINK
+env envelope_66F4, 221
+portamento 0x81, 39, 255
+notedv PITCH_B5, 0xC8, 85
+end
+
+.channel env_time_travel_end
+ldi 30
+stio 1
+ldlayer 0, layer_2A6D
+ldlayer 1, layer_2A7B
+ldlayer 2, layer_2A8A
+vibfreq 251
+vibdepth 6
+end
+
+.layer layer_2A6D
+instr FONT00_INSTR_WARP
+transpose 24
+env envelope_66F4, 230
+.layer layer_2A75
+notedv PITCH_A4, 0x7D00, 64
+rjump layer_2A75
+
+.layer layer_2A7B
+instr FONT00_INSTR_WATER_FLOWING
+transpose 48
+legato
+env envelope_66F4, 180
+.layer layer_2A84
+notedv PITCH_F5, 0x7D00, 40
+rjump layer_2A84
+
+.layer layer_2A8A
+instr FONT00_INSTR_SHIMMER
+env envelope_66F4, 180
+legato
+.layer layer_2A91
+notedv PITCH_C5, 0x7D00, 64
+rjump layer_2A91
+
+.channel env_jabu_platform_rise_stop
+gain 20
+ldlayer 0, layer_2AA8
+ldlayer 1, layer_2AA0
+end
+
+.layer layer_2AA0
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_G1, 0x1E, 80
+jump layer_1B35
+
+.layer layer_2AA8
+instr FONT00_INSTR_BLOCK_LOCK
+portamento 0x81, 32, 127
+notedv PITCH_A3, 0x64, 110
+end
+
+.channel env_jabu_platform_fall_stop
+gain 10
+ldlayer 0, layer_1B2E
+ldlayer 1, layer_2AC6
+ldlayer 2, layer_2ABE
+end
+
+.layer layer_2ABE
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_D1, 0x32, 80
+jump layer_1B35
+
+.layer layer_2AC6
+instr FONT00_INSTR_BLOCK_LOCK
+notedv PITCH_D3, 0x78, 110
+end
+
+.channel env_goron_fall
+ldlayer 0, layer_2AD4
+vibdepth 4
+vibfreq 58
+end
+
+.layer layer_2AD4
+transpose 12
+instr FONTANY_INSTR_SINE
+env envelope_66D0, 248
+portamento 0x81, 56, 255
+notedv PITCH_F3, 0x7F, 60
+end
+
+.channel env_spell_fire_stance
+ldlayer 0, layer_3E5
+ldlayer 1, layer_747
+end
+
+.channel env_ice_melt
+ldlayer 0, layer_2B01
+ldlayer 1, layer_2AF2
+end
+
+.layer layer_2AF2
+instr FONT00_INSTR_SLIDE_BLOCK
+env envelope_66FC, 225
+portamento 0x81, 62, 255
+notedv PITCH_C5, 0xAA, 96
+end
+
+.layer layer_2B01
+instr FONT00_INSTR_BOMB
+env envelope_66FC, 225
+portamento 0x81, 51, 255
+notedv PITCH_A2, 0xAA, 96
+end
+
+.channel env_fire_pillar
+ldlayer 0, layer_2C60
+end
+
+.channel env_unused5
+instr FONT00_INSTR_DOOR_METAL
+env envelope_6610
+ldlayer 0, layer_2B1D
+end
+
+.layer layer_2B1D
+notedv PITCH_GF3, 0x9, 110
+loop 32
+notedv PITCH_AF3, 0x8, 115
+loopend
+notedv PITCH_BF3, 0xB, 115
+end
+
+.channel env_magic_vanish
+ldlayer 0, layer_2B31
+ldlayer 1, layer_2B39
+end
+
+.layer layer_2B31
+instr FONT00_INSTR_FAIRY
+env envelope_66FC, 195
+rjump layer_2B41
+
+.layer layer_2B39
+instr FONT00_INSTR_SHIMMER
+env envelope_66FC, 195
+transpose 48
+.layer layer_2B41
+portamento 0x81, 44, 255
+notedv PITCH_E5, 0x64, 85
+end
+
+.channel env_ocarina_warp
+ldi 129
+stseq 0, layer_2B95+1
+stseq 0, layer_2BA6+1
+ldlayer 0, layer_2B5D
+ldlayer 1, layer_2B9F
+ldlayer 2, layer_2B86
+end
+
+.layer layer_2B5D
+ldelay 0x172
+end
+
+.channel env_ocarina_arrive
+ldi 130
+stseq 0, layer_2B95+1
+stseq 0, layer_2BA6+1
+ldlayer 0, layer_2B5D
+ldlayer 1, layer_2B9F
+ldlayer 2, layer_2B86
+end
+
+.channel env_fairy_heal
+ldi 129
+stseq 0, layer_2B95+1
+stseq 0, layer_2BA6+1
+ldlayer 0, layer_2B8C
+ldlayer 1, layer_2B9F
+end
+
+.layer layer_2B86
+instr FONT00_INSTR_FAIRY_MAGIC
+transpose -12
+rjump layer_2B90
+
+.layer layer_2B8C
+instr FONT00_INSTR_SHIMMER
+transpose 48
+.layer layer_2B90
+legato
+env envelope_67D8, 221
+.layer layer_2B95
+portamento 0x81, 27, 255
+.layer layer_2B99
+notedv PITCH_C5, 500, 85
+rjump layer_2B99
+
+.layer layer_2B9F
+instr FONT00_INSTR_FAIRY_MAGIC
+legato
+env envelope_67D8, 221
+.layer layer_2BA6
+portamento 0x81, 51, 255
+.layer layer_2BAA
+notedv PITCH_B5, 500, 85
+rjump layer_2BAA
+
+.channel env_door_boss_unlock
+gain 20
+ldlayer 0, layer_2BC7
+ldlayer 1, layer_2BBC
+ldlayer 2, layer_26D8
+end
+
+.layer layer_2BBC
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_E2, 0xF, 84
+instr FONT00_INSTR_CHAIN
+notedv PITCH_C4, 0x3D, 66
+end
+
+.layer layer_2BC7
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_E1, 0x8, 84
+transpose 48
+notedv PITCH_EF2, 0x0, 80
+end
+
+.channel env_crate_small_break
+ldlayer 0, layer_2BD9
+ldlayer 1, layer_1F7B
+end
+
+.layer layer_2BD9
+transpose -12
+jump layer_1F6E
+
+.channel env_unused6
+ldlayer 1, layer_1F1C
+
+.channel env_crate_small_drop
+ldlayer 0, layer_2BE5
+end
+
+.layer layer_2BE5
+instr FONT00_INSTR_STICK_ATTACK
+notedv PITCH_C3, 0x4, 100
+notedv PITCH_G2, 0x8, 100
+end
+
+.channel env_ruto_rebound_jabu
+ldlayer 0, layer_561
+ldlayer 1, layer_2958
+end
+
+.channel env_door_creak_rumble
+gain 15
+ldlayer 0, layer_286B
+ldlayer 1, layer_24A5
+end
+
+.channel env_night_howl
+ldi 25
+stio 1
+ldlayer 0, layer_2C05
+end
+
+.layer layer_2C05
+instr FONT00_INSTR_ANIMALS_1
+transpose 48
+notedv PITCH_G3, 0x0, 70
+end
+
+.channel env_jabu_groan
+ldlayer 0, layer_137D
+ldlayer 1, layer_1361
+ldlayer 2, layer_299C
+jump chan_135C
+
+.channel env_frog_jump
+ldlayer 0, layer_2C20
+ldlayer 1, layer_2C2A
+end
+
+.layer layer_2C20
+instr FONT00_INSTR_ANIMALS_0
+transpose 48
+releaserate 241
+notedv PITCH_C3, 0x2B, 100
+end
+
+.layer layer_2C2A
+instr FONTANY_INSTR_SQUARE
+env envelope_65D8, 251
+portamento 0x81, 15, 255
+notedv PITCH_C5, 0x28, 45
+end
+
+.channel env_ice_freeze_old
+ldlayer 0, layer_2C47
+ldlayer 1, layer_2C3F
+end
+
+.layer layer_2C3F
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_667C, 240
+rjump layer_2C4E
+
+.layer layer_2C47
+instr FONT00_INSTR_FIRE_WIND
+legato
+portamento 0x81, 32, 255
+.layer layer_2C4E
+notedv PITCH_C2, 0x190, 105
+rjump layer_2C4E
+
+.channel env_fire_wall
+ldlayer 1, layer_2C62
+ldi 88
+stseq 0, chan_2287+1
+jump chan_2267
+
+.layer layer_2C60
+transpose 6
+
+.layer layer_2C62
+instr FONT00_INSTR_FIRE_WALL
+env envelope_667C, 230
+legato
+portamento 0x85, 3, 255
+.layer layer_2C6D
+notedv PITCH_E1, 0x55, 80
+notedv PITCH_C1, 0x20, 80
+rjump layer_2C6D
+
+.channel env_wood_rebound
+instr FONT00_INSTR_STICK_ATTACK
+ldlayer 0, layer_2C7E
+ldlayer 1, layer_13EE
+end
+
+.layer layer_2C7E
+notedv PITCH_GF3, 0xD, 100
+notedv PITCH_A2, 0x0, 72
+end
+
+.channel env_water_drip_unused2
+ldi 80
+stio 1
+ldlayer 0, layer_2C91
+ldlayer 1, layer_2C8F
+end
+
+.layer layer_2C8F
+transpose -1
+
+.layer layer_2C91
+ldelay 0x30
+instr FONT00_INSTR_WATER_DRIP
+notedv PITCH_GF3, 0x40, 105
+end
+
+.channel env_jabu_breathe
+ldlayer 0, layer_2C9D
+end
+
+.layer layer_2C9D
+instr FONT00_INSTR_ROAR_BARK
+releaserate 240
+portamento 0x83, 8, 255
+notedvg PITCH_C2, 0xA8, 85, 5
+notedv PITCH_C1, 0x96, 85
+end
+
+.channel env_dalm_block_hit
+gain 10
+ldlayer 0, layer_1F6E
+ldlayer 1, layer_1F7B
+ldlayer 2, layer_2B31
+end
+
+.channel env_boulder_roll
+ldlayer 0, layer_2CC8
+ldlayer 1, layer_2CC2
+end
+
+.layer layer_2CC2
+instr FONT00_INSTR_MECH_CHARGE
+transpose 15
+rjump layer_2CCA
+
+.layer layer_2CC8
+instr FONT00_INSTR_ROLL_BOULDER
+.layer layer_2CCA
+legato
+releaserate 235
+portamento 0x81, 22, 175
+.layer layer_2CD1
+notedv PITCH_C3, 0x60, 95
+rjump layer_2CD1
+
+.channel env_elevator_groan_unused
+ldlayer 0, layer_2CDF
+ldlayer 1, layer_2CDD
+end
+
+.layer layer_2CDD
+transpose -24
+
+.layer layer_2CDF
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_6674, 251
+legato
+portamento 1, 36, 127
+.layer layer_2CEA
+notedv PITCH_F5, 32700, 95
+rjump layer_2CEA
+
+.channel env_diamond_switch_on
+call env_guard_attention
+jump env_treasure_flash
+
+.channel env_kakariko_fire
+panweight 48
+ldlayer 2, layer_2357
+jump env_fire_wall
+
+.channel env_rainbow_bridge_appear
+call env_triforce_aura
+.channel chan_2D01
+ldlayer 1, layer_2937
+ldi 100
+call delay_varyingvol
+ldlayer 2, layer_2937
+ldi 100
+call delay_varyingvol
+rjump chan_2D01
+
+.channel env_flying_old
+ldlayer 1, layer_2D25
+ldlayer 2, layer_2D23
+ldi 102
+stseq 0, chan_2287+1
+jump chan_2267
+end
+
+.layer layer_2D23
+transpose -9
+
+.layer layer_2D25
+legato
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_6818, 241
+portamento 1, 44, 127
+.layer layer_2D30
+notedv PITCH_B4, 32700, 80
+rjump layer_2D30
+
+.channel env_flying_end_old
+ldlayer 0, layer_2D3A
+end
+
+.layer layer_2D3A
+transpose 12
+legato
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_6694, 221
+portamento 0x85, 48, 255
+notedv PITCH_D4, 0x24, 105
+notedv PITCH_G5, 0x64, 105
+end
+
+.channel env_deku_sprout_grow
+ldlayer 0, layer_2D55
+ldlayer 1, layer_599
+end
+
+.layer layer_2D55
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_6688, 230
+portamento 0x81, 10, 255
+notedv PITCH_A4, 0x46, 95
+end
+
+.channel env_desert_storm
+ldlayer 0, layer_2D6E
+ldlayer 1, layer_2D6A
+end
+
+.layer layer_2D6A
+transpose 27
+rjump layer_2D70
+
+.layer layer_2D6E
+transpose 36
+.layer layer_2D70
+legato
+instr FONT00_INSTR_FIRE_WIND
+env envelope_6674, 200
+portamento 0x85, 56, 255
+.layer layer_2D7B
+notedv PITCH_B5, 500, 58
+notedv PITCH_E5, 350, 58
+rjump layer_2D7B
+
+.channel env_triforce_mark
+ldlayer 0, layer_255B
+ldlayer 1, layer_2D8F
+ldlayer 2, layer_2790
+end
+
+.layer layer_2D8F
+instr FONT00_INSTR_FAIRY
+env envelope_66FC, 195
+portamento 0x81, 0, 255
+notedv PITCH_F2, 0x7F, 85
+end
+
+.channel env_grave_explode
+gain 20
+ldlayer 0, layer_1A36
+ldlayer 1, layer_1F6E
+ldlayer 2, layer_1F7B
+end
+
+.channel env_obj_drop_water
+ldlayer 0, layer_1ACE
+end
+
+.channel env_obj_lift_water
+ldlayer 0, layer_2DB1
+end
+
+.layer layer_2DB1
+instr FONT00_INSTR_WATER_SPLISH
+notedv PITCH_B4, 0x9, 100
+instr FONT00_INSTR_WATER_SPLASH
+env envelope_664C, 240
+notedv PITCH_A4, 0x6, 90
+notedv PITCH_B4, 0x22, 80
+end
+
+.channel env_ganondorf_cloak
+instr FONT00_INSTR_CLOAK
+ldlayer 0, layer_2DC9
+end
+
+.layer layer_2DC9
+portamento 0x81, 27, 127
+notedv PITCH_F3, 0x64, 100
+end
+
+.channel env_dig
+ldlayer 0, layer_3CC
+ldlayer 1, layer_599
+end
+
+.channel env_lab_bubbles
+ldlayer 0, layer_2DDC
+end
+
+.layer layer_2DDC
+instr FONT00_INSTR_WATER_BUBBLES
+releaserate 200
+notedv PITCH_G3, 0x40, 55
+end
+
+.channel env_ice_break_old
+instr FONT00_INSTR_CHATTER
+env envelope_65D8
+ldlayer 0, layer_2DF0
+ldlayer 1, layer_2DF6
+end
+
+.layer layer_2DF0
+transpose 48
+notedv PITCH_C4, 0x48, 94
+end
+
+.layer layer_2DF6
+transpose 48
+notedv PITCH_B4, 0x48, 112
+end
+
+.channel env_frog_grow
+ldlayer 0, layer_2E00
+end
+
+.layer layer_2E00
+instr FONTANY_INSTR_BELL
+env envelope_6610, 251
+portamento 0x83, 0, 255
+notedv PITCH_AF2, 0x2C, 60
+notedv PITCH_D3, 0x2C, 60
+notedv PITCH_G3, 0x2C, 60
+end
+
+.channel env_water_flow
+panweight 48
+ldlayer 0, layer_23C9
+ldlayer 1, layer_23B7
+end
+
+.channel env_gate_large_open
+ldlayer 0, layer_2E21
+end
+
+.layer layer_2E21
+instr FONT00_INSTR_DOOR_METAL
+transpose 48
+notedv PITCH_C3, 0x0, 110
+end
+
+.channel env_goddess_face_break
+call env_bwall_break
+ldlayer 2, layer_1A30
+end
+
+.channel env_goddess_face_explode
+ldlayer 0, layer_1A36
+ldlayer 1, layer_299A
+end
+
+.channel env_goddess_face_crumble
+ldlayer 0, layer_29AD
+ldlayer 1, layer_29AF
+end
+
+.channel env_trap_blade_move_old
+ldlayer 0, layer_2E45
+ldlayer 1, layer_26FA
+end
+
+.layer layer_2E45
+instr FONT00_INSTR_SWORD_DRAW
+portamento 0x81, 24, 64
+notedv PITCH_G2, 0x7F, 85
+end
+
+.channel env_unused7
+instr FONT00_INSTR_CHATTER
+ldlayer 0, layer_2E55
+end
+
+.layer layer_2E55
+transpose 48
+notedv PITCH_A3, 0xA, 94
+end
+
+.channel env_warp_lower
+ldi 130
+jump chan_27B2
+
+.channel env_sage_chamber_ambient
+ldi 32
+stio 1
+ldlayer 0, layer_2E67
+end
+
+.layer layer_2E67
+instr FONT00_INSTR_WATER_DRIP
+.layer layer_2E69
+notedv PITCH_B0, 0x0, 70
+rjump layer_2E69
+
+.channel env_sage_chamber_energy
+ldi 32
+stio 1
+ldlayer 0, layer_2E75
+end
+
+.layer layer_2E75
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_6710, 251
+legato
+portamento 0x81, 39, 255
+.layer layer_2E80
+notedv PITCH_C3, 0xFA, 110
+rjump layer_2E80
+
+.channel env_dog_bark
+ldlayer 0, layer_2E8A
+end
+
+.layer layer_2E8A
+instr FONT00_INSTR_ROAR_BARK
+transpose 48
+notedv PITCH_C4, 0x0, 100
+end
+
+.channel env_zelda_cast_spell
+instr FONT00_INSTR_WARP
+gain 15
+ldlayer 1, layer_290F
+ldlayer 0, layer_2EA0
+ldlayer 2, layer_2EAF
+end
+
+.layer layer_2EA0
+instr FONT00_INSTR_FAIRY
+env envelope_67E4, 200
+portamento 0x81, 50, 180
+notedv PITCH_C5, 0xC8, 110
+end
+
+.layer layer_2EAF
+releaserate 200
+notedv PITCH_C4, 0xC8, 115
+end
+
+.channel env_rain
+instr FONTANY_INSTR_DRUM
+panweight 0
+ldlayer 0, layer_2EC1
+ldlayer 1, layer_2EC8
+end
+
+.layer layer_2EC1
+legato
+.layer layer_2EC2
+notedv FONT00_DRUM_RAIN_1, 32700, 80
+rjump layer_2EC2
+
+.layer layer_2EC8
+legato
+.layer layer_2EC9
+notedv FONT00_DRUM_RAIN_0, 32700, 80
+rjump layer_2EC9
+
+.channel env_door_metal_open
+ldlayer 0, layer_2ED3
+end
+
+.layer layer_2ED3
+instr FONT00_INSTR_DOOR_METAL
+transpose 48
+notedv PITCH_D4, 0x0, 110
+end
+
+.channel env_door_metal_close
+ldlayer 0, layer_2EDF
+end
+
+.layer layer_2EDF
+instr FONT00_INSTR_DOOR_METAL
+transpose 48
+notedv PITCH_G3, 0x0, 110
+end
+
+.channel env_whirlpool
+ldlayer 0, layer_23C5
+ldlayer 1, layer_23AD
+end
+
+.channel env_tower_break
+gain 10
+ldlayer 0, layer_2EFA
+ldlayer 1, layer_2F0A
+ldlayer 2, layer_1F41
+end
+
+.layer layer_2EFA
+instr FONT00_INSTR_EXPLOSION_0
+releaserate 221
+notedv PITCH_C4, 0xC, 82
+portamento 0x81, 27, 255
+notedv PITCH_F2, 0x91, 105
+end
+
+.layer layer_2F0A
+instr FONT00_INSTR_MECH_CHARGE
+releaserate 221
+notedv PITCH_C5, 0xC, 82
+portamento 0x81, 39, 255
+notedv PITCH_F3, 0x91, 105
+end
+
+.channel env_cow_moo
+instr FONT00_INSTR_FIRE_COW
+ldlayer 0, layer_2F20
+end
+
+.layer layer_2F20
+transpose 48
+notedv PITCH_C4, 0x0, 100
+end
+
+.channel env_obj_break_unused
+ldlayer 0, layer_2F2D
+ldlayer 1, layer_2F38
+end
+
+.layer layer_2F2D
+instr FONT00_INSTR_DOOR_METAL
+transpose 48
+notedv PITCH_G5, 0xD, 66
+notedv PITCH_D5, 0x1A, 66
+end
+
+.layer layer_2F38
+instr FONT00_INSTR_POTTERY_ELECTRIC
+transpose 48
+notedv PITCH_A3, 0x0, 68
+notedv PITCH_C4, 0x0, 68
+end
+
+.channel env_rock_barrier_hit
+ldlayer 3, layer_1E0A
+call env_grave_explode
+end
+
+.channel env_frog_croak_leave
+ldlayer 0, layer_2F4E
+end
+
+.layer layer_2F4E
+instr FONT00_INSTR_ANIMALS_0
+transpose 48
+notedv PITCH_F3, 0x8, 85
+notedv PITCH_D3, 0x8, 85
+portamento 0x81, 27, 127
+notedv PITCH_A3, 0x18, 85
+end
+
+.channel env_frog_croak_grow
+ldlayer 0, layer_2F64
+end
+
+.layer layer_2F64
+instr FONT00_INSTR_ANIMALS_0
+transpose 48
+notedv PITCH_F3, 0x8, 85
+notedv PITCH_A3, 0x8, 85
+portamento 0x81, 34, 127
+notedv PITCH_C3, 0x18, 85
+end
+
+.channel env_cow_moo_distant
+instr FONT00_INSTR_FIRE_COW
+releaserate 180
+ldi 20
+stio 1
+.channel chan_2F7D
+ldlayer 0, layer_2FB2
+ldi 255
+call delay_varyingvol
+rand 2
+stseq 47, layer_2FAB+1
+randptr 106, 150
+stptrtoseq addr_2FB6
+ldi 1
+ldseq addr_2FB6
+stseq 0, chan_2F9F+1
+ldlayer 0, layer_2FAB
+.channel chan_2F9F
+ldi 1
+call delay_varyingvol
+ldi 255
+call delay_varyingvol
+rjump chan_2F7D
+
+.layer layer_2FAB
+transpose 48
+notedv PITCH_C4, 0x93, 60
+end
+
+.layer layer_2FB2
+ldelay 0x7D00
+end
+
+.array addr_2FB6
+byte 0x0
+byte 0x0
+
+.channel env_door_ranch_close
+ldlayer 0, layer_2FBF
+ldlayer 1, layer_2BC7
+end
+
+.layer layer_2FBF
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_E2, 0x0, 84
+end
+
+.channel env_butterfly_transform
+ldlayer 0, layer_2FCC
+ldlayer 1, layer_2FDC
+end
+
+.layer layer_2FCC
+instr FONT00_INSTR_SHIMMER
+transpose 48
+env envelope_6638, 251
+portamento 0x81, 39, 255
+notedv PITCH_C5, 0x64, 80
+end
+
+.layer layer_2FDC
+instr FONT00_INSTR_FAIRY_MAGIC
+env envelope_6638, 251
+portamento 0x81, 39, 255
+notedv PITCH_C5, 0x64, 80
+end
+
+.channel env_gossip_stretch
+ldlayer 0, layer_2FEE
+end
+
+.layer layer_2FEE
+instr FONTANY_INSTR_BELL
+env envelope_6610, 251
+portamento 0x83, 0, 255
+notedv PITCH_AF3, 0x3C, 60
+end
+
+.channel env_gossip_launch
+ldlayer 0, layer_1F03
+jump chan_1A2C
+
+.channel env_spike_log_roll
+ldlayer 0, layer_3006
+end
+
+.layer layer_3006
+instr FONT00_INSTR_CHAIN_RETRACT
+legato
+.layer layer_3009
+notedv PITCH_DF3, 32700, 80
+rjump layer_3009
+
+.channel env_barrier_energy
+ldlayer 0, layer_3016
+ldlayer 1, layer_3029
+end
+
+.layer layer_3016
+instr FONT00_INSTR_OCARINA_0
+env envelope_6674, 251
+legato
+portamento 0x85, 15, 255
+.layer layer_3021
+notedv PITCH_C3, 0x64, 55
+notedv PITCH_C2, 0x64, 55
+rjump layer_3021
+
+.layer layer_3029
+instr FONT00_INSTR_WARP
+env envelope_6674, 251
+legato
+portamento 0x85, 27, 255
+.layer layer_3034
+notedv PITCH_C4, 0x32, 65
+notedv PITCH_C3, 0x32, 65
+rjump layer_3034
+
+.channel env_barrier_hum
+ldlayer 0, layer_3046
+ldlayer 1, layer_3059
+ldlayer 2, layer_306C
+end
+
+.layer layer_3046
+instr FONTANY_INSTR_SINE
+env envelope_6674, 251
+legato
+portamento 0x85, 3, 255
+.layer layer_3051
+notedv PITCH_G1, 0x2D, 40
+notedv PITCH_C1, 0x2D, 40
+rjump layer_3051
+
+.layer layer_3059
+instr FONT00_INSTR_WARP
+env envelope_6674, 251
+legato
+portamento 0x85, 34, 255
+.layer layer_3064
+notedv PITCH_G4, 0x5A, 65
+notedv PITCH_G3, 0x5A, 65
+rjump layer_3064
+
+.layer layer_306C
+instr FONT00_INSTR_OCARINA_0
+env envelope_6674, 251
+legato
+portamento 0x85, 7, 255
+.layer layer_3077
+notedv PITCH_E2, 0xB4, 55
+notedv PITCH_E1, 0xB4, 55
+rjump layer_3077
+
+.channel env_child_walk
+ldlayer 0, layer_3085
+end
+
+.layer layer_3085
+instr FONT00_INSTR_STEP_GROUND
+portamento 0x81, 43, 255
+notedv PITCH_E2, 0xE, 60
+end
+
+.channel env_guard_walk
+ldlayer 0, layer_30A0
+ldlayer 1, layer_3096
+end
+
+.layer layer_3096
+instr FONT00_INSTR_STEP_GROUND
+portamento 0x81, 32, 127
+notedv PITCH_F3, 0xA, 76
+end
+
+.layer layer_30A0
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_F4, 0x6, 48
+instr FONT00_INSTR_STEP_FIRE
+notedv PITCH_C4, 0xA, 48
+end
+
+.channel env_pillar_stop
+ldlayer 0, layer_30AF
+end
+
+.layer layer_30AF
+instr FONT00_INSTR_BLOCK_LOCK
+releaserate 241
+notedv PITCH_GF4, 0x6, 75
+notedv PITCH_F3, 0x64, 75
+end
+
+.filter filter_env0
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter filter_env1
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter filter_env2
+filter 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/assets/sequences/sfxbanks/item.seq.inc b/assets/sequences/sfxbanks/item.seq.inc
new file mode 100644
index 00000000000..c4fe4f97129
--- /dev/null
+++ b/assets/sequences/sfxbanks/item.seq.inc
@@ -0,0 +1,1201 @@
+.table table_item
+entry item_map_select_cursor
+entry item_sword_swing
+entry item_sword_sheathe
+entry item_sword_draw
+entry item_arrow_shoot
+entry item_boomerang_throw
+entry item_shield_strike
+entry item_bow_draw
+entry item_shield_blade_bounce
+entry item_arrow_strike
+entry item_hammer_strike
+entry item_hookshot_extend
+entry item_mirror_fire
+entry item_bomb_fuse
+entry item_bomb_explode
+entry item_bomb_defuse
+entry item_boomerang_fly
+entry item_sword_strike
+entry item_hammer_swing
+entry item_hookshot_strike
+entry item_arrow_hit_enemy
+entry item_arrow_hit_object
+entry item_unused1
+entry item_unused2
+entry item_fishing_rod
+entry env_bomb_rebound
+entry item_sword_strike_wall
+entry item_sword_strike_bwall
+entry item_sword_strike_stone
+entry item_stick_break
+entry item_whip_epona
+entry item_shield
+entry item_slingshot_fly
+entry item_slingshot_draw
+entry item_sword_charge
+entry item_sword_spin
+entry item_sword_strike_unused
+entry item_slingshot_reflect
+entry item_shield_sheathe
+entry item_hookshot_ready
+entry item_hookshot_unused
+entry item_hookshot_strike_object
+entry item_sword_reflect
+entry item_deku_nut_strike
+entry item_jabu_struck
+entry item_sword_unused
+entry item_sword_spin_small
+entry item_sword_spin_large
+entry item_bow_empty
+entry item_bombchu_fuse
+entry item_shield_charge_1
+entry item_shield_charge_2
+entry item_shield_charge_3
+entry item_slingshot_empty
+entry item_sword_unused2
+entry item_sword_strike_wood
+entry item_shield_unused
+entry item_arrow_magic_fly
+entry item_arrow_fire_strike
+entry item_arrow_ice_strike
+entry item_arrow_light_strike
+entry item_reel_slow
+entry item_reel_fast
+entry item_bow_draw
+entry item_goddess_zoom
+entry item_goddess_launch
+entry item_goddess_boom
+entry item_explosion_unused
+entry env_horse_neigh
+entry item_explosion_unused
+entry item_explosive_flames
+entry item_scarecrow_jump
+entry item_flame_wall
+entry env_triforce_glow
+entry item_fishing_rod_strike
+entry item_explosion_unused2
+entry item_sword_break
+entry item_unused4
+entry item_sword_swing_magic
+entry item_bomb_defuse
+
+.channel item_map_select_cursor
+instr FONT00_INSTR_SWORD_STRIKE
+ldlayer 0, layer_F89
+end
+
+.layer layer_F89
+notedv PITCH_F4, 0x18, 110
+end
+
+.channel item_sword_swing
+ldlayer 0, layer_F91
+end
+
+.layer layer_F91
+instr FONT00_INSTR_SWORD_MISS
+portamento 0x81, 29, 255
+notedv PITCH_D2, 0x2A, 100
+end
+
+.channel item_sword_sheathe
+instr FONT00_INSTR_SWORD_SHEATHE
+ldlayer 0, layer_FA1
+end
+
+.layer layer_FA1
+notedv PITCH_A3, 0x30, 100
+end
+
+.channel item_sword_draw
+instr FONT00_INSTR_SWORD_DRAW
+ldlayer 0, layer_FAB
+end
+
+.layer layer_FAB
+notedv PITCH_A3, 0x30, 100
+end
+
+.channel item_arrow_shoot
+ldlayer 0, layer_FB3
+end
+
+.layer layer_FB3
+instr FONT00_INSTR_SWORD_SWING
+notedv PITCH_A3, 0x30, 100
+end
+
+.channel item_boomerang_throw
+instr FONT00_INSTR_WHISTLE_AIR
+ldlayer 0, layer_FBF
+end
+
+.layer layer_FBF
+legato
+portamento 0x85, 0, 255
+notedv PITCH_A3, 0xC, 80
+notedv PITCH_F2, 0x19, 80
+end
+
+.channel item_shield_strike
+instr FONT00_INSTR_SWORD_HIT_SHIELD
+env envelope_664C
+ldlayer 0, layer_FD4
+end
+
+.layer layer_FD4
+notedv PITCH_B3, 0x6, 82
+notedv PITCH_E3, 0x0, 82
+end
+
+.channel item_bow_draw
+instr FONT00_INSTR_BOW
+ldlayer 0, layer_FE1
+end
+
+.layer layer_FE1
+portamento 0x81, 43, 255
+notedv PITCH_GF4, 0xE, 110
+end
+
+.channel item_shield_blade_bounce
+instr FONT00_INSTR_SWORD_HIT_SHIELD
+env envelope_65E8
+ldlayer 0, layer_FF5
+ldlayer 1, layer_FF9
+end
+
+.layer layer_FF5
+notedv PITCH_C4, 0x24, 105
+end
+
+.layer layer_FF9
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+notedv PITCH_DF3, 0x0, 100
+end
+
+.channel item_arrow_strike
+instr FONT00_INSTR_ARROW_WOOD
+ldlayer 0, layer_1007
+end
+
+.layer layer_1007
+notedv PITCH_C4, 0x45, 100
+end
+
+.channel item_hammer_strike
+gain 20
+ldlayer 0, layer_1011
+end
+
+.layer layer_1011
+instr FONT00_INSTR_SWORD_STRIKE
+releaserate 236
+notedv PITCH_DF1, 0x6, 76
+instr FONT00_INSTR_SLAM_HEAVY
+env envelope_65E8, 240
+notedv PITCH_B3, 0x24, 110
+end
+
+.channel item_hookshot_extend
+ldlayer 0, layer_1033
+ldlayer 1, layer_1029
+end
+
+.layer layer_1029
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_664C, 255
+notedv PITCH_B5, 0xC, 108
+end
+
+.layer layer_1033
+instr FONT00_INSTR_CHAIN
+.layer layer_1035
+notedv PITCH_B4, 0x7, 93
+rjump layer_1035
+
+.channel item_mirror_fire
+gain 15
+ldlayer 0, layer_1045
+ldlayer 1, layer_105C
+end
+
+.layer layer_1043
+transpose -9
+
+.layer layer_1045
+instr FONT00_INSTR_SWORD_HIT_SHIELD
+env envelope_65E8, 251
+portamento 0x81, 16, 100
+notedv PITCH_F4, 0x6, 102
+portamento 0x81, 20, 100
+notedv PITCH_E5, 0x28, 110
+end
+
+.layer layer_105A
+transpose -9
+
+.layer layer_105C
+instr FONT00_INSTR_SYNTH_BUZZ
+env envelope_6610, 251
+portamento 0x81, 32, 208
+notedv PITCH_B5, 0x28, 80
+end
+
+.channel item_bomb_fuse
+instr FONT00_INSTR_BOMB
+ldlayer 0, layer_1070
+end
+
+.layer layer_1070
+legato
+.layer layer_1071
+notedv PITCH_A3, 0x30, 80
+rjump layer_1071
+
+.channel item_bomb_explode
+ldlayer 0, layer_107A
+end
+
+.layer layer_107A
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_66D0, 225
+notedv PITCH_F4, 0xA0, 110
+end
+
+.channel item_bomb_defuse
+ldlayer 0, layer_1089
+end
+
+.layer layer_1089
+instr FONT00_INSTR_BOMB
+env envelope_65E8, 245
+portamento 0x85, 34, 255
+notedv PITCH_E4, 0x8, 105
+notedv PITCH_F3, 0x18, 105
+end
+
+.layer layer_unused_109A
+portamento 0x81, 32, 255
+notedv PITCH_F2, 0x1E, 105
+end
+
+.channel item_boomerang_fly
+instr FONT00_INSTR_SWORD_SWING
+env envelope_6688
+ldlayer 0, layer_10AB
+end
+
+.layer layer_10AB
+legato
+portamento 0x85, 8, 255
+notedv PITCH_F2, 0x18, 90
+notedv PITCH_B3, 0xE, 90
+nolegato
+legato
+portamento 0x85, 10, 255
+notedv PITCH_G2, 0x14, 90
+notedv PITCH_C4, 0xC, 90
+nolegato
+.layer layer_10C3
+legato
+portamento 0x85, 12, 255
+notedv PITCH_A2, 0x11, 90
+notedv PITCH_D4, 0xA, 90
+nolegato
+jump layer_10C3
+
+.channel item_sword_strike
+instr FONT00_INSTR_SOFT_HIT
+env envelope_66C8
+ldlayer 0, layer_10DB
+end
+
+.layer layer_10DB
+notedv PITCH_GF2, 0x3, 110
+portamento 0x2, 11, 12
+notedv PITCH_AF3, 0x6, 110
+end
+
+.channel item_hammer_swing
+ldlayer 0, layer_10EA
+end
+
+.layer layer_10EA
+instr FONT00_INSTR_SWORD_MISS
+portamento 0x81, 19, 255
+notedv PITCH_E1, 0x60, 100
+end
+
+.channel item_hookshot_strike
+ldlayer 0, layer_10F8
+end
+
+.layer layer_10F8
+call layer_fn_1103
+portamento 0x1, 34, 24
+notedv PITCH_D4, 0x48, 100
+end
+
+.layer layer_fn_1103
+instr FONT00_INSTR_SWORD_STRIKE
+transpose -18
+notedv PITCH_E3, 0x9, 100
+end
+
+.channel item_arrow_hit_enemy
+instr FONT00_INSTR_SWORD_SWING
+ldlayer 0, layer_1111
+end
+
+.layer layer_1111
+portamento 0x81, 38, 127
+notedv PITCH_E1, 0x14, 105
+portamento 0x81, 3, 127
+notedv PITCH_F3, 0xA, 105
+end
+
+.channel item_arrow_hit_object
+jump item_arrow_strike
+
+.channel item_unused1
+ldlayer 0, layer_112A
+ldlayer 1, layer_113A
+end
+
+.layer layer_112A
+transpose -2
+instr FONT00_INSTR_SWORD_SWING
+legato
+portamento 0x85, 3, 255
+notedv PITCH_C2, 0x9, 90
+notedv PITCH_BF3, 0x12, 90
+end
+
+.layer layer_113A
+transpose -1
+instr FONT00_INSTR_EGG_BREAK
+portamento 0x81, 34, 255
+notedv PITCH_C3, 0x1B, 80
+end
+
+.channel item_unused2
+ldlayer 0, layer_114D
+ldlayer 1, layer_115D
+end
+
+.layer layer_114D
+transpose 4
+instr FONT00_INSTR_SWORD_SWING
+legato
+portamento 0x85, 3, 255
+notedv PITCH_F2, 0xC, 103
+notedv PITCH_F4, 0x18, 103
+end
+
+.layer layer_115D
+transpose 4
+instr FONT00_INSTR_EGG_BREAK
+portamento 0x81, 34, 255
+notedv PITCH_C3, 0x28, 87
+end
+
+.channel item_fishing_rod
+ldlayer 0, layer_1170
+ldlayer 1, layer_117C
+end
+
+.layer layer_1170
+instr FONT00_INSTR_SWORD_MISS
+portamento 0x81, 32, 255
+notedv PITCH_F2, 0x24, 105
+ldelay 0x68
+end
+
+.layer layer_117C
+instr FONT00_INSTR_WHOOSH
+portamento 0x81, 46, 44
+notedv PITCH_G3, 0x8C, 75
+end
+
+.channel item_sword_strike_wall
+instr FONT00_INSTR_SWORD_STRIKE
+env envelope_6674
+ldlayer 0, layer_1196
+.channel chan_118F
+vibfreq 127
+vibdepthgrad 0, 128, 56
+end
+
+.layer layer_1196
+notedv PITCH_E2, 0x60, 110
+end
+
+.channel item_sword_strike_bwall
+instr FONT00_INSTR_SWORD_STRIKE
+ldlayer 0, layer_11A3
+ldlayer 1, layer_11AF
+end
+
+.layer layer_11A3
+env envelope_6674, 251
+portamento 0x1, 27, 30
+notedv PITCH_A3, 0x60, 100
+end
+
+.layer layer_11AF
+notedv PITCH_C3, 0x60, 96
+end
+
+.channel item_sword_strike_stone
+ldlayer 0, layer_11B7
+end
+
+.layer layer_11B7
+instr FONT00_INSTR_SWORD_STRIKE
+env envelope_6610, 251
+notedv PITCH_A1, 0x8, 110
+notedv PITCH_F1, 0x30, 110
+end
+
+.channel item_stick_break
+instr FONT00_INSTR_WOOD_BREAK
+env envelope_6660
+ldlayer 0, layer_11CD
+end
+
+.layer layer_11CD
+notedvg PITCH_AF2, 0x7, 93, 127
+notedv PITCH_G3, 0x5, 90
+end
+
+.channel item_whip_epona
+ldlayer 0, layer_11D9
+end
+
+.layer layer_11D9
+instr FONT00_INSTR_SWORD_SWING
+notedv PITCH_A3, 0x8, 105
+instr FONT00_INSTR_WHIP_CORK
+env envelope_6624, 255
+notedv PITCH_GF3, 0x16, 87
+end
+
+.channel item_shield
+ldlayer 0, layer_11EF
+ldlayer 1, layer_11F5
+end
+
+.layer layer_11EF
+instr FONT00_INSTR_SWORD_SHEATHE
+notedv PITCH_F3, 0x12, 110
+end
+
+.layer layer_11F5
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+env envelope_6720, 251
+notedv PITCH_C3, 0xA, 75
+notedvg PITCH_E3, 0x4, 75, 127
+notedv PITCH_E3, 0x4, 75
+end
+
+.channel item_slingshot_fly
+instr FONT00_INSTR_SWORD_SWING
+ldlayer 0, layer_120E
+end
+
+.layer layer_120E
+portamento 0x81, 48, 255
+notedv PITCH_A0, 0x12, 100
+end
+
+.channel item_slingshot_draw
+instr FONT00_INSTR_BOW
+ldlayer 0, layer_121C
+end
+
+.layer layer_121C
+portamento 0x81, 39, 127
+notedv PITCH_B4, 0x7, 110
+end
+
+.channel item_sword_charge
+ldi 24
+stio 1
+ldlayer 0, layer_124B
+ldlayer 1, layer_1234
+vibfreq 127
+vibdepthgrad 0, 160, 9
+end
+
+.layer layer_1234
+instr FONTANY_INSTR_8PULSE
+portamento 0x81, 3, 255
+notedv PITCH_G4, 0x64, 30
+portamento 0x81, 15, 255
+notedv PITCH_G5, 0x64, 30
+legato
+.layer layer_1245
+notedv PITCH_G5, 0xC8, 30
+rjump layer_1245
+
+.layer layer_124B
+instr FONT00_INSTR_SYNTH_BUZZ
+legato
+transpose 9
+portamento 0x81, 3, 255
+.layer layer_1254
+notedv PITCH_G5, 0xC8, 50
+rjump layer_1254
+
+.channel item_sword_spin
+ldlayer 0, layer_1266
+ldlayer 1, layer_1264
+ldlayer 2, layer_1170
+end
+
+.layer layer_1264
+transpose -4
+
+.layer layer_1266
+instr FONT00_INSTR_WHOOSH
+portamento 0x81, 51, 44
+notedv PITCH_F3, 0x8C, 90
+end
+
+.channel item_sword_strike_unused
+instr FONT00_INSTR_SOFT_HIT
+env envelope_66C8
+ldlayer 0, layer_127D
+ldlayer 1, layer_113A
+end
+
+.layer layer_127D
+notedv PITCH_A2, 0x3, 110
+portamento 0x2, 14, 12
+notedv PITCH_B3, 0x6, 110
+ldelay 0x7
+end
+
+.channel item_slingshot_reflect
+ldlayer 0, layer_128E
+end
+
+.layer layer_128E
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+notedvg PITCH_A2, 0x3, 100, 127
+releaserate 251
+portamento 0x81, 15, 48
+notedv PITCH_DF3, 0x24, 100
+end
+
+.channel item_shield_sheathe
+ldlayer 0, layer_12A7
+ldlayer 1, layer_12AD
+end
+
+.layer layer_12A7
+instr FONT00_INSTR_SWORD_SHEATHE
+notedv PITCH_A3, 0x12, 110
+end
+
+.layer layer_12AD
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+env envelope_6720, 251
+notedv PITCH_F3, 0xA, 75
+notedvg PITCH_E3, 0x4, 75, 127
+notedv PITCH_E2, 0x4, 75
+end
+
+.channel item_hookshot_ready
+ldlayer 0, layer_12C7
+ldlayer 1, layer_12CD
+end
+
+.layer layer_12C7
+instr FONT00_INSTR_SWORD_SHEATHE
+notedv PITCH_EF4, 0x10, 105
+end
+
+.layer layer_12CD
+instr FONT00_INSTR_SWORD_STRIKE
+env envelope_664C, 251
+notedv PITCH_AF3, 0x4, 86
+notedv PITCH_A2, 0x4, 64
+end
+
+.channel item_hookshot_unused
+ldlayer 0, layer_12E7
+ldlayer 1, layer_12E1
+end
+
+.layer layer_12E1
+instr FONT00_INSTR_SWORD_SHEATHE
+notedv PITCH_A2, 0x28, 105
+end
+
+.layer layer_12E7
+instr FONT00_INSTR_CHAIN
+releaserate 238
+notedv PITCH_D5, 0x8, 86
+instr 26
+notedv PITCH_GF4, 0x18, 100
+end
+
+.channel item_hookshot_strike_object
+ldlayer 0, layer_12FB
+ldlayer 1, layer_1309
+end
+
+.layer layer_12FB
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_6624, 251
+portamento 0x81, 50, 144
+notedv PITCH_B2, 0x20, 110
+end
+
+.layer layer_1309
+instr FONT00_INSTR_SWORD_STRIKE
+env envelope_664C, 241
+notedv PITCH_AF2, 0x4, 64
+notedv PITCH_A3, 0xC, 56
+end
+
+.channel item_sword_reflect
+ldi 24
+stio 1
+ldlayer 0, layer_1320
+ldlayer 1, layer_117C
+end
+
+.layer layer_1320
+instr FONT00_INSTR_SYNTH_BUZZ
+legato
+transpose 12
+portamento 0x81, 56, 127
+notedv PITCH_F4, 0x24, 80
+end
+
+.channel item_deku_nut_strike
+ldlayer 0, layer_1334
+ldlayer 1, layer_1344
+end
+
+.layer layer_1334
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+env envelope_66D0, 232
+portamento 0x81, 19, 72
+notedv PITCH_GF2, 0x4, 83
+end
+
+.layer layer_1344
+instr FONT00_INSTR_WHIP_CORK
+releaserate 225
+portamento 0x81, 45, 200
+notedv PITCH_DF3, 0x4, 110
+end
+
+.channel item_jabu_struck
+ldi 32
+stio 1
+ldlayer 0, layer_137F
+ldlayer 1, layer_1373
+ldlayer 2, layer_1361
+.channel chan_135C
+vibfreq 100
+vibdepth 84
+end
+
+.layer layer_1361
+legato
+instr FONT00_INSTR_OCARINA_0
+env envelope_6674, 251
+portamento 0x85, 11, 255
+notedv PITCH_AF2, 0x24, 60
+notedv PITCH_AF1, 0x24, 60
+end
+
+.layer layer_1373
+instr FONT00_INSTR_EGG_BREAK
+portamento 0x82, 15, 255
+notedv PITCH_C3, 0x3E, 105
+end
+
+.layer layer_137D
+transpose -6
+
+.layer layer_137F
+ldelay 0x1
+instr FONT00_INSTR_ROAR_BARK
+env envelope_65D8, 251
+portamento 0x81, 20, 255
+notedv PITCH_AF2, 0x8, 85
+portamento 0x81, 27, 255
+notedv PITCH_C2, 0x60, 85
+end
+
+.channel item_sword_unused
+instr FONT00_INSTR_SWORD_DRAW
+ldlayer 0, layer_139C
+end
+
+.layer layer_139C
+portamento 0x83, 32, 127
+notedv PITCH_G3, 0x8, 100
+notedv PITCH_EF4, 0x18, 100
+end
+
+.channel item_sword_spin_small
+ldlayer 0, layer_13C5
+ldlayer 1, layer_13B1
+ldlayer 2, layer_1170
+end
+
+.layer layer_13B1
+transpose 17
+.layer layer_13B3
+instr FONT00_INSTR_SYNTH_BUZZ
+env envelope_6638, 251
+legato
+portamento 0x85, 44, 255
+notedv PITCH_F5, 0x10, 68
+notedv PITCH_D1, 0x2C, 68
+end
+
+.layer layer_13C5
+transpose -2
+jump layer_1266
+
+.channel item_sword_spin_large
+ldlayer 0, layer_1266
+ldlayer 1, layer_13D4
+ldlayer 2, layer_13D8
+end
+
+.layer layer_13D4
+transpose 20
+rjump layer_13B3
+
+.layer layer_13D8
+instr FONT00_INSTR_FLAME_THUNDER
+releaserate 221
+legato
+portamento 0x85, 28, 255
+notedv PITCH_DF4, 0x10, 74
+notedv PITCH_A3, 0x44, 74
+end
+
+.channel item_bow_empty
+gain 22
+ldlayer 0, layer_13EE
+end
+
+.layer layer_13EE
+instr FONT00_INSTR_BOW
+env envelope_65D8, 251
+transpose 48
+portamento 0x81, 43, 127
+notedv PITCH_AF4, 0x60, 95
+end
+
+.channel item_bombchu_fuse
+ldlayer 0, layer_1402
+end
+
+.layer layer_1402
+instr FONT00_INSTR_BOMB
+transpose 48
+legato
+portamento 0x1, 36, 56
+.layer layer_140B
+notedv PITCH_E4, 0x7D00, 80
+rjump layer_140B
+
+.channel item_shield_charge_1
+ldi 0
+stio 6
+.channel chan_1414
+ldseq addr_142D
+stseq 0, layer_fn_145A+1
+ldio 6
+ldseq addr_1431
+stseq 0, layer_1455+1
+ldi 24
+stio 1
+ldlayer 0, layer_1448
+ldlayer 1, layer_1435
+end
+
+.array addr_142D
+byte 0x0
+byte 0x4
+byte 0x8
+byte 0x0
+
+.array addr_1431
+byte 0x60
+byte 0x30
+byte 0x18
+byte 0x60
+
+.layer layer_1435
+call layer_fn_145A
+
+.layer layer_1438
+instr FONT00_INSTR_SYNTH
+legato
+portamento 0x85, 24, 255
+notedv PITCH_C2, 0x6, 90
+notedv PITCH_B4, 0x50, 90
+ldelay 0x21
+end
+
+.layer layer_1448
+call layer_fn_145A
+instr FONT00_INSTR_SYNTH
+env envelope_66C8, 251
+.layer layer_1451
+portamento 0x81, 3, 255
+.layer layer_1455
+notedv PITCH_A2, 0x60, 88
+rjump layer_1451
+
+.layer layer_fn_145A
+transpose 0
+end
+
+.channel item_shield_charge_2
+ldi 1
+stio 6
+rjump chan_1414
+
+.channel item_shield_charge_3
+ldi 2
+stio 6
+rjump chan_1414
+
+.channel item_slingshot_empty
+instr FONT00_INSTR_BOW
+env envelope_67BC
+gain 8
+ldlayer 0, layer_1472
+end
+
+.layer layer_1472
+transpose 48
+portamento 0x81, 48, 127
+notedv PITCH_DF5, 0x30, 105
+end
+
+.channel item_sword_unused2
+ldlayer 0, layer_1483
+ldlayer 1, layer_148D
+end
+
+.layer layer_1483
+instr FONT00_INSTR_EXPLOSION_0
+portamento 0x81, 48, 144
+notedv PITCH_F2, 0xE, 96
+end
+
+.layer layer_148D
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_BF2, 0xE, 72
+end
+
+.channel item_sword_strike_wood
+ldlayer 0, layer_149A
+ldlayer 1, layer_14A4
+end
+
+.layer layer_149A
+instr FONT00_INSTR_STICK_ATTACK
+env envelope_65E8, 244
+notedv PITCH_GF4, 0x8, 110
+end
+
+.layer layer_14A4
+instr FONT00_INSTR_STEP_BRIDGE
+ldelay 0x3
+env envelope_65E8, 244
+notedv PITCH_GF2, 0x5, 110
+end
+
+.channel item_shield_unused
+gain 15
+ldlayer 0, layer_1043
+ldlayer 1, layer_105A
+end
+
+.channel item_arrow_magic_fly
+ldlayer 0, layer_14C0
+ldlayer 1, layer_FB3
+end
+
+.layer layer_14C0
+instr FONT00_INSTR_WHOOSH
+portamento 0x81, 15, 40
+notedv PITCH_F4, 0x40, 80
+end
+
+.channel item_arrow_fire_strike
+ldlayer 0, layer_14D6
+.channel chan_14CD
+ldlayer 1, layer_14E0
+ldlayer 2, layer_15B1
+gain 20
+end
+
+.layer layer_14D6
+instr FONT00_INSTR_IGNITE
+env envelope_6688, 200
+notedv PITCH_C3, 0x44, 100
+end
+
+.layer layer_14E0
+transpose 48
+jump layer_2A06
+
+.channel item_arrow_ice_strike
+ldlayer 0, layer_14EA
+rjump chan_14CD
+
+.layer layer_14EA
+instr FONT00_INSTR_WARP
+transpose 10
+env envelope_6688, 200
+notedv PITCH_C5, 0x44, 100
+end
+
+.channel item_arrow_light_strike
+ldlayer 0, layer_14FB
+rjump chan_14CD
+
+.layer layer_14FB
+instr FONT00_INSTR_FAIRY
+env envelope_667C, 200
+notedv PITCH_A4, 0x44, 54
+end
+
+.channel item_reel_slow
+instr FONT00_INSTR_BOW
+ldlayer 0, layer_150B
+end
+
+.layer layer_150B
+notedv PITCH_F4, 0x6, 102
+rjump layer_150B
+
+.channel item_reel_fast
+instr FONT00_INSTR_BOW
+ldlayer 0, layer_1516
+end
+
+.layer layer_1516
+notedv PITCH_A4, 0x3, 102
+rjump layer_1516
+
+.channel item_goddess_zoom
+call chan_fn_2823
+ldlayer 0, layer_1528
+ldlayer 1, layer_1532
+ldlayer 2, layer_153C
+end
+
+.layer layer_1528
+instr FONT00_INSTR_SHIMMER
+portamento 0x81, 55, 255
+notedv PITCH_E3, 0x48, 65
+end
+
+.layer layer_1532
+instr FONT00_INSTR_MECH_CHARGE
+portamento 0x81, 55, 231
+notedv PITCH_E4, 0x48, 58
+end
+
+.layer layer_153C
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_66D0, 231
+portamento 0x81, 51, 255
+notedv PITCH_A2, 0x30, 72
+end
+
+.channel item_goddess_launch
+call chan_fn_2823
+ldlayer 0, layer_1557
+ldlayer 1, layer_1561
+ldlayer 2, layer_156F
+end
+
+.layer layer_1557
+instr FONT00_INSTR_SHIMMER
+portamento 0x82, 44, 231
+notedv PITCH_E2, 0x48, 85
+end
+
+.layer layer_1561
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_66F4, 231
+portamento 0x82, 51, 255
+notedv PITCH_D4, 0x48, 112
+end
+
+.layer layer_156F
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_66D0, 231
+portamento 0x82, 51, 255
+notedv PITCH_A2, 0x30, 85
+end
+
+.channel item_goddess_boom
+ldi 30
+stio 1
+ldlayer 0, layer_158A
+ldlayer 1, layer_15A2
+ldlayer 2, layer_15B1
+end
+
+.layer layer_158A
+instr FONT00_INSTR_SHIMMER
+portamento 0x81, 48, 231
+notedv PITCH_A2, 0x18, 75
+instr 77
+env envelope_6740, 231
+portamento 0x81, 38, 255
+notedv PITCH_B2, 0xE8, 105
+end
+
+.layer layer_15A2
+instr FONT00_INSTR_DISTORTION
+env envelope_67CC, 231
+portamento 0x81, 14, 255
+notedv PITCH_B2, 0xE8, 95
+end
+
+.layer layer_15B1
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_6610, 231
+notedv PITCH_A3, 0x48, 105
+end
+
+.channel item_explosion_unused
+ldlayer 0, layer_15C7
+ldlayer 1, layer_15C5
+ldlayer 2, layer_2185
+end
+
+.layer layer_15C5
+transpose -18
+
+.layer layer_15C7
+instr FONT00_INSTR_EXPLOSION_0
+releaserate 221
+notedv PITCH_B4, 0xC8, 85
+end
+
+.channel item_explosive_flames
+ldlayer 0, layer_15D7
+ldlayer 1, layer_1EF0
+end
+
+.layer layer_15D7
+instr FONT00_INSTR_EXPLOSION_0
+releaserate 240
+notedv PITCH_B4, 0x7F, 85
+end
+
+.channel item_scarecrow_jump
+ldlayer 0, layer_15E3
+end
+
+.layer layer_15E3
+instr FONT00_INSTR_BOW
+env envelope_65D8, 251
+transpose 48
+portamento 0x81, 19, 255
+notedv PITCH_AF4, 0x30, 80
+end
+
+.channel item_flame_wall
+ldlayer 0, layer_2C60
+ldlayer 1, layer_1BEF
+end
+
+.channel item_fishing_rod_strike
+ldlayer 0, layer_1601
+ldlayer 1, layer_160C
+end
+
+.layer layer_1601
+instr FONT00_INSTR_WHIP_CORK
+releaserate 224
+notedv PITCH_G4, 0x6, 100
+notedv PITCH_AF3, 0x0, 100
+end
+
+.layer layer_160C
+instr FONT00_INSTR_WHOOSH
+notedv PITCH_EF4, 0x14, 76
+instr 33
+notedv PITCH_EF5, 0xA, 102
+end
+
+.channel item_explosion_unused2
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_66D0
+ldlayer 0, layer_1620
+end
+
+.layer layer_1620
+notedv PITCH_G3, 0x0, 95
+end
+
+.channel item_sword_break
+instr FONT00_INSTR_SWORD_HIT_SHIELD
+env envelope_6610
+ldlayer 0, layer_1633
+ldlayer 1, layer_105A
+ldlayer 2, layer_11B7
+end
+
+.layer layer_1633
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 36
+notedv PITCH_E3, 0x8, 100
+notedv PITCH_A3, 0x0, 100
+end
+
+.channel item_unused4
+ldlayer 0, layer_1642
+end
+
+.layer layer_1642
+instr FONT00_INSTR_WHIP_CORK
+notedv PITCH_G3, 0xD, 96
+end
+
+.channel item_sword_swing_magic
+ldi 16
+stio 1
+ldlayer 1, layer_1651
+jump item_hammer_swing
+
+.layer layer_1651
+instr FONT00_INSTR_SHIMMER
+env envelope_6610, 235
+portamento 0x82, 29, 127
+notedv PITCH_GF2, 0x28, 74
+end
+
+.filter filter_item0
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter filter_item1
+filter 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/assets/sequences/sfxbanks/ocarina.seq.inc b/assets/sequences/sfxbanks/ocarina.seq.inc
new file mode 100644
index 00000000000..19c199484fc
--- /dev/null
+++ b/assets/sequences/sfxbanks/ocarina.seq.inc
@@ -0,0 +1,121 @@
+.table table_ocarina
+entry ocarina_ocarina
+entry ocarina_voidout
+entry env_door_open_oca
+entry ocarina_warp_in
+entry ocarina_warp_out
+entry env_grotto_exit
+entry ocarina_respawn
+entry ocarina_ocarina
+
+.channel ocarina_ocarina
+ldi 80
+stio 1
+ldio 7
+and 7
+ldseq addr_5F30
+stseq 0, chan_5F0C+1
+ldio 7
+and 7
+ldseq addr_5F38
+stseq 0, layer_5F2B+3
+.channel chan_5F0C
+instr FONT00_INSTR_OCARINA_0
+ldio 5
+rbltz chan_5F15
+stseq 0, layer_5F29+1
+.channel chan_5F15
+ldlayer 0, layer_5F28
+.channel chan_5F18
+ldio 6
+rbltz chan_5F21
+stseq 0, @+1
+vibdepth 0
+.channel chan_5F21
+ldi 1
+call delay_varyingvol
+rjump chan_5F18
+
+.layer layer_5F28
+legato
+.layer layer_5F29
+transpose 0
+.layer layer_5F2B
+notedv PITCH_C4, 0x1E0, 127
+end
+
+.array addr_5F30
+byte 0x34
+byte 0x55
+byte 0x56
+byte 0x59
+byte 0x53
+byte 0x52
+byte 0x34
+byte 0x34
+
+.array addr_5F38
+byte 115
+byte 115
+byte 100
+byte 115
+byte 100
+byte 115
+byte 115
+byte 115
+
+.channel ocarina_warp_out
+ldi 129
+.channel chan_5F42
+vibfreq 64
+vibdepthgrad 4, 8, 8
+stseq 0, layer_5F5C+1
+instr FONT00_INSTR_FAIRY
+env envelope_66FC
+releaserate 240
+ldlayer 0, layer_5F5A
+ldlayer 1, layer_5F5C
+end
+
+.layer layer_5F5A
+transpose 24
+
+.layer layer_5F5C
+portamento 0x81, 15, 255
+notedv PITCH_G3, 0x8C, 80
+end
+
+.channel ocarina_warp_in
+ldi 130
+rjump chan_5F42
+
+.channel ocarina_voidout
+ldi 80
+stseq 0, layer_5F90+1
+ldi 129
+.channel chan_5F71
+stseq 0, layer_5F8C+1
+ldi 20
+stio 1
+gain 15
+ldlayer 0, layer_5F84
+vibfreq 8
+vibdepthgrad 4, 40, 8
+end
+
+.layer layer_5F84
+instr FONT00_INSTR_SHIMMER
+transpose 48
+env envelope_6740, 251
+.layer layer_5F8C
+portamento 0x81, 32, 224
+.layer layer_5F90
+notedv PITCH_DF2, 0x50, 105
+ldelay 0x60
+end
+
+.channel ocarina_respawn
+ldi 40
+stseq 0, layer_5F90+1
+ldi 130
+rjump chan_5F71
diff --git a/assets/sequences/sfxbanks/player.seq.inc b/assets/sequences/sfxbanks/player.seq.inc
new file mode 100644
index 00000000000..8790ab3075b
--- /dev/null
+++ b/assets/sequences/sfxbanks/player.seq.inc
@@ -0,0 +1,2304 @@
+.table table_player_kid
+entry player_child_step_dirt
+entry player_child_step_sand
+entry player_child_step_stone
+entry player_child_step_jabu
+entry player_child_step_water
+entry player_child_step_water_deep
+entry player_child_step_tall_grass
+entry player_child_step_lava
+entry player_child_step_grass
+entry player_child_step_carpet
+entry player_child_step_wood
+entry player_child_step_bridge
+entry player_step_vines
+entry player_step_iron_boots
+entry player_step_unused
+entry player_child_step_ice
+entry player_child_jump_dirt
+entry player_child_jump_sand
+entry player_child_jump_stone
+entry player_child_jump_jabu
+entry player_child_jump_water
+entry player_child_jump_water_deep
+entry player_child_jump_tall_grass
+entry player_child_jump_lava
+entry player_child_jump_grass
+entry player_child_jump_carpet
+entry player_child_jump_wood
+entry player_child_jump_bridge
+entry player_child_step_dirt
+entry player_jump_iron_boots
+entry player_jump_unused
+entry player_child_jump_ice
+entry player_child_land_dirt
+entry player_child_land_sand
+entry player_child_land_stone
+entry player_child_land_jabu
+entry player_child_land_water
+entry player_child_land_water_deep
+entry player_child_land_tall_grass
+entry player_child_land_lava
+entry player_child_land_grass
+entry player_child_land_carpet
+entry player_child_land_wood
+entry player_child_land_bridge
+entry player_child_step_dirt
+entry player_land_iron_boots
+entry player_land_unused
+entry player_child_land_ice
+entry player_climb_down_vine_top
+entry player_climb_up_vine_top
+entry player_climb_on_epona
+entry player_jump_off_epona
+entry player_shield_epona
+entry player_change_item_held
+entry player_catch_boomerang
+entry player_large_splash
+entry player_small_splash
+entry player_swim
+entry player_throw
+entry player_hit_wall_old
+entry player_flip
+entry player_sidejump
+entry player_hit_blunt
+entry player_hit_stab
+entry player_slip_dirt
+entry player_slip_sand
+entry player_slip_stone
+entry player_slip_jabu
+entry player_slip_water
+entry player_slip_water_deep
+entry player_slip_tall_grass
+entry player_slip_lava
+entry player_slip_grass
+entry player_slip_carpet
+entry player_slip_wood
+entry player_slip_bridge
+entry player_child_step_water
+entry player_slip_wood
+entry player_slip_unused
+entry player_slip_stone
+entry player_rebound_dirt
+entry player_rebound_sand
+entry player_rebound_stone
+entry player_rebound_jabu
+entry player_rebound_water
+entry player_rebound_water_deep
+entry player_rebound_tall_grass
+entry player_rebound_lava
+entry player_rebound_grass
+entry player_rebound_carpet
+entry player_rebound_wood
+entry player_rebound_bridge
+entry player_child_step_dirt
+entry player_rebound_wood
+entry player_rebound_unused
+entry player_rebound_ice
+entry player_step_iron_boots
+entry player_jump_iron_boots
+entry player_land_iron_boots
+entry player_dive_surface
+entry player_dive_down
+entry player_dive_move
+entry player_child_metalequip
+entry player_adult_metalequip
+entry player_electric_shock
+entry player_lift_grass
+entry player_lift_rock
+entry player_morpha_bubble
+entry player_lift_giant_rock
+entry player_sword_charge
+entry player_freeze
+entry player_lift_pot
+entry player_hit_unused
+entry player_idle_shuffle
+entry player_idle_slide
+entry player_dive_unused
+entry player_freeze_short
+entry player_ice_break
+entry player_slip_ice
+entry player_sheathe_item_unused
+entry player_lift_crate
+entry player_cast_fire
+entry player_cast_wind
+entry player_cast_wind_return
+entry player_cast_soul
+entry player_arrow_fire_charge
+entry player_arrow_ice_charge
+entry player_arrow_light_charge
+.table table_player_old
+entry player_adult_step_dirt
+entry player_adult_step_sand
+entry player_adult_step_stone
+entry player_adult_step_jabu
+entry player_adult_step_water
+entry player_adult_step_water_deep
+entry player_adult_step_tall_grass
+entry player_adult_step_lava
+entry player_adult_step_grass
+entry player_adult_step_carpet
+entry player_adult_step_wood
+entry player_adult_step_bridge
+entry player_adult_step_vine
+entry player_step_iron_boots
+entry player_child_step_dirt
+entry player_adult_step_ice
+entry player_adult_jump_dirt
+entry player_adult_jump_sand
+entry player_adult_jump_stone
+entry player_adult_jump_jabu
+entry player_adult_jump_water
+entry player_adult_jump_water_deep
+entry player_adult_jump_tall_grass
+entry player_adult_jump_lava
+entry player_adult_jump_grass
+entry player_adult_jump_carpet
+entry player_adult_jump_wood
+entry player_adult_jump_bridge
+entry player_child_step_dirt
+entry player_jump_iron_boots
+entry player_child_step_dirt
+entry player_adult_jump_ice
+entry player_adult_land_dirt
+entry player_adult_land_sand
+entry player_adult_land_stone
+entry player_adult_land_jabu
+entry player_adult_land_water
+entry player_adult_land_water_deep
+entry player_adult_land_tall_grass
+entry player_adult_land_lava
+entry player_adult_land_grass
+entry player_adult_land_carpet
+entry player_adult_land_wood
+entry player_adult_land_bridge
+entry player_adult_step_dirt
+entry player_land_iron_boots
+entry player_child_step_dirt
+entry player_adult_land_ice
+entry player_crawl_dirt
+entry player_crawl_sand
+entry player_crawl_stone
+entry player_crawl_jabu
+entry player_crawl_water
+entry player_crawl_water_deep
+entry player_crawl_tall_grass
+entry player_crawl_lava
+entry player_crawl_grass
+entry player_crawl_carpet
+entry player_crawl_wood
+entry player_crawl_bridge
+entry player_child_step_dirt
+entry player_child_step_dirt
+entry player_child_step_dirt
+entry player_crawl_ice
+entry player_cast_soul_end
+entry player_roll_dust
+entry player_crash_unused
+entry player_cast_soul_appear
+entry player_fairy_heal
+entry player_rebound_unarmed
+entry player_plant_seed
+entry player_plant_grow
+entry player_cast_wind_dismiss
+entry player_hover
+entry player_plant_hover
+entry env_elevator_move
+entry player_child_step_dirt
+entry player_child_step_dirt
+entry player_child_step_dirt
+entry player_child_step_dirt
+entry player_slip_dirt2 # Used; all other slip values are ignored
+entry player_slip_sand2
+entry player_slip_stone2
+entry player_slip_jabu2
+entry player_slip_jabu2
+entry player_slip_jabu2
+entry player_slip_lava2
+entry player_slip_jabu2
+entry player_slip_grass2
+entry player_slip_dirt2
+entry player_slip_unused2
+entry player_slip_unused2
+entry player_child_step_water
+entry player_slip_unused2
+entry player_slip_iron_boots_unused
+entry player_slip_stone2
+
+.channel player_child_step_dirt
+ldlayer 0, layer_2A7
+end
+
+.layer layer_2A5
+transpose -2
+
+.layer layer_2A7
+instr FONT00_INSTR_STEP_GROUND
+notedv PITCH_E3, 0x15, 56
+end
+
+.layer layer_2AD
+transpose -6
+ldelay 0xD
+instr FONT00_INSTR_SWORD_STRIKE
+notedvg PITCH_D4, 0x4, 36, 127
+instr FONT00_INSTR_STEP_FIRE
+notedv PITCH_G3, 0x4, 56
+end
+
+.channel player_child_step_sand
+ldlayer 0, layer_2C3
+end
+
+.layer layer_2C1
+transpose -2
+
+.layer layer_2C3
+instr FONT00_INSTR_STEP_SAND
+notedv PITCH_A3, 0x15, 56
+end
+
+.channel player_child_step_stone
+ldi 20
+stio 1
+ldlayer 0, layer_2D2
+end
+
+.layer layer_2D0
+transpose -2
+
+.layer layer_2D2
+instr FONT00_INSTR_STEP_ROCK
+notedv PITCH_GF3, 0x15, 95
+end
+
+.channel player_child_step_jabu
+ldlayer 0, layer_2DE
+end
+
+.layer layer_2DC
+transpose -2
+
+.layer layer_2DE
+instr FONT00_INSTR_STEP_JABU
+portamento 0x82, 31, 255
+notedv PITCH_A3, 0x2D, 93
+end
+
+.channel player_child_step_water
+ldlayer 0, layer_2EE
+end
+
+.layer layer_2EC
+transpose -2
+
+.layer layer_2EE
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_A3, 0x1E, 56
+end
+
+.channel player_child_step_water_deep
+ldlayer 0, layer_2FA
+end
+
+.layer layer_2F8
+transpose -2
+
+.layer layer_2FA
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_F3, 0x1E, 56
+end
+
+.channel player_child_step_tall_grass
+ldlayer 0, layer_306
+end
+
+.layer layer_304
+transpose -2
+
+.layer layer_306
+instr FONT00_INSTR_STEP_CARPET_0
+notedv PITCH_F3, 0x6, 80
+instr FONT00_INSTR_STEP_GRASS
+releaserate 235
+notedv PITCH_B3, 0x30, 80
+end
+
+.channel player_child_step_lava
+ldlayer 0, layer_319
+end
+
+.layer layer_317
+transpose -2
+
+.layer layer_319
+instr FONT00_INSTR_STEP_GROUND
+notedv PITCH_C3, 0x4, 42
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_GF2, 0x6, 56
+instr FONT00_INSTR_BOMB
+portamento 0x81, 44, 255
+notedv PITCH_F3, 0x16, 64
+end
+
+.channel player_child_step_grass
+ldlayer 0, layer_333
+end
+
+.layer layer_331
+transpose -2
+
+.layer layer_333
+instr FONT00_INSTR_STEP_CARPET_0
+env envelope_66B0, 250
+notedv PITCH_A3, 0x15, 70
+end
+
+.channel player_child_step_carpet
+ldlayer 0, layer_343
+end
+
+.layer layer_341
+transpose -2
+
+.layer layer_343
+instr FONT00_INSTR_STEP_CARPET_1
+notedv PITCH_GF4, 0x0, 80
+end
+
+.channel player_child_step_wood
+ldlayer 0, layer_34F
+end
+
+.layer layer_34D
+transpose -2
+
+.layer layer_34F
+instr FONT00_INSTR_STEP_WOOD
+notedv PITCH_AF3, 0x14, 86
+end
+
+.channel player_child_step_bridge
+ldlayer 0, layer_35B
+end
+
+.layer layer_359
+transpose -2
+
+.layer layer_35B
+instr FONT00_INSTR_STEP_BRIDGE
+notedv PITCH_C3, 0x18, 76
+end
+
+.channel player_step_vines
+ldlayer 0, layer_36A
+ldlayer 1, layer_2AD
+end
+
+.layer layer_368
+transpose -2
+
+.layer layer_36A
+instr FONT00_INSTR_STEP_SAND
+notedvg PITCH_DF3, 0x6, 110, 127
+notedv PITCH_E1, 0xA, 110
+ldelay 0x5
+end
+
+.channel player_step_iron_boots
+instr FONT00_INSTR_STEP_IRON
+ldlayer 0, layer_37C
+end
+
+.layer layer_37C
+notedv PITCH_E3, 0x28, 96
+end
+
+.channel player_step_unused
+ldlayer 0, layer_384
+end
+
+.layer layer_384
+instr FONT00_INSTR_STEP_SAND
+notedv PITCH_A2, 0x2A, 56
+end
+
+.channel player_child_step_ice
+ldlayer 0, layer_390
+end
+
+.layer layer_38E
+transpose -2
+
+.layer layer_390
+instr FONT00_INSTR_STEP_ICE
+notedv PITCH_A3, 0x15, 85
+end
+
+.channel player_child_jump_dirt
+instr FONT00_INSTR_STEP_GROUND
+ldlayer 0, layer_3A1
+ldlayer 1, layer_3AA
+end
+
+.layer layer_39F
+transpose -2
+
+.layer layer_3A1
+notedv PITCH_E3, 0xA, 63
+notedv PITCH_C4, 0xA, 63
+ldelay 0x7
+end
+
+.layer layer_3AA
+ldelay 0x7
+instr FONT00_INSTR_SWORD_HIT_SHIELD
+env envelope_6660, 250
+notedvg PITCH_C5, 0x6, 60, 127
+instr FONT00_INSTR_SWORD_STRIKE
+notedvg PITCH_F4, 0x4, 48, 127
+instr FONT00_INSTR_STEP_FIRE
+notedv PITCH_F3, 0x5, 55
+notedv PITCH_B3, 0x5, 55
+end
+
+.channel player_child_jump_sand
+ldlayer 0, layer_3CE
+ldlayer 1, layer_3AA
+end
+
+.layer layer_3CC
+transpose -2
+
+.layer layer_3CE
+instr FONT00_INSTR_STEP_SAND
+notedv PITCH_A3, 0xA, 63
+notedv PITCH_F4, 0xA, 63
+ldelay 0x7
+end
+
+.channel player_child_jump_stone
+ldi 20
+stio 1
+ldlayer 0, layer_3E5
+ldlayer 1, layer_3AA
+end
+
+.layer layer_3E3
+transpose -2
+
+.layer layer_3E5
+instr FONT00_INSTR_STEP_ROCK
+notedvg PITCH_GF3, 0xA, 95, 127
+notedvg PITCH_B3, 0xA, 95, 127
+ldelay 0x7
+end
+
+.channel player_child_jump_jabu
+ldlayer 0, layer_3FB
+ldlayer 1, layer_3AA
+end
+
+.layer layer_3F9
+transpose -2
+
+.layer layer_3FB
+instr FONT00_INSTR_STEP_JABU
+notedv PITCH_F3, 0xA, 63
+notedv PITCH_D4, 0xA, 63
+ldelay 0x7
+end
+
+.channel player_child_jump_water
+ldlayer 0, layer_40F
+ldlayer 1, layer_3AA
+end
+
+.layer layer_40D
+transpose -2
+
+.layer layer_40F
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_A3, 0xA, 63
+notedv PITCH_F4, 0x1E, 63
+end
+
+.channel player_child_jump_water_deep
+ldlayer 0, layer_421
+ldlayer 1, layer_3AA
+end
+
+.layer layer_41F
+transpose -2
+
+.layer layer_421
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_F3, 0xA, 63
+notedv PITCH_D4, 0x1E, 63
+end
+
+.channel player_child_jump_tall_grass
+ldlayer 0, layer_433
+ldlayer 1, layer_3AA
+end
+
+.layer layer_431
+transpose -2
+
+.layer layer_433
+instr FONT00_INSTR_STEP_CARPET_0
+notedv PITCH_E3, 0x6, 80
+instr FONT00_INSTR_STEP_GRASS
+releaserate 225
+notedv PITCH_A3, 0xA, 75
+notedv PITCH_E4, 0x30, 80
+end
+
+.channel player_child_jump_lava
+ldlayer 0, layer_44C
+ldlayer 1, layer_3AA
+end
+
+.layer layer_44A
+transpose -2
+
+.layer layer_44C
+instr FONT00_INSTR_STEP_GROUND
+notedv PITCH_BF2, 0x4, 45
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_G2, 0x6, 63
+instr FONT00_INSTR_BOMB
+portamento 0x81, 42, 255
+notedv PITCH_E3, 0xE, 49
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_EF3, 0xE, 63
+end
+
+.channel player_child_jump_grass
+ldlayer 0, layer_46E
+ldlayer 1, layer_3AA
+end
+
+.layer layer_46C
+transpose -2
+
+.layer layer_46E
+instr FONT00_INSTR_STEP_CARPET_0
+notedv PITCH_G3, 0xA, 63
+notedv PITCH_F4, 0xA, 63
+ldelay 0x7
+end
+
+.channel player_child_jump_carpet
+ldlayer 0, layer_482
+ldlayer 1, layer_3AA
+end
+
+.layer layer_480
+transpose -2
+
+.layer layer_482
+instr FONT00_INSTR_STEP_CARPET_1
+notedv PITCH_C4, 0xA, 78
+notedv PITCH_A4, 0xA, 78
+ldelay 0x7
+end
+
+.channel player_child_jump_wood
+ldlayer 0, layer_496
+ldlayer 1, layer_3AA
+end
+
+.layer layer_494
+transpose -2
+
+.layer layer_496
+instr FONT00_INSTR_STEP_WOOD
+notedv PITCH_AF3, 0xA, 73
+notedv PITCH_F4, 0x1E, 73
+end
+
+.channel player_child_jump_bridge
+ldlayer 0, layer_4A8
+ldlayer 1, layer_3AA
+end
+
+.layer layer_4A6
+transpose -2
+
+.layer layer_4A8
+instr FONT00_INSTR_STEP_BRIDGE
+notedv PITCH_F3, 0xA, 63
+notedv PITCH_B3, 0x19, 63
+end
+
+.channel player_jump_iron_boots
+instr FONT00_INSTR_STEP_IRON
+ldlayer 0, layer_4B7
+end
+
+.layer layer_4B7
+notedv PITCH_EF3, 0xA, 96
+notedv PITCH_A3, 0x18, 96
+end
+
+.layer layer_unused_4BE
+transpose 2
+portamento 0x85, 26, 255
+notedv PITCH_EF2, 0xA, 80
+legato
+transpose 5
+portamento 0x85, 26, 255
+notedv PITCH_EF2, 0xF, 80
+notedv PITCH_EF2, 0x12, 80
+notedv PITCH_G2, 0xF, 80
+end
+
+.channel player_jump_unused
+ldlayer 0, layer_4DF
+ldlayer 1, layer_3AA
+end
+
+.layer layer_4DF
+instr FONT00_INSTR_STEP_SAND
+notedv PITCH_A2, 0x12, 63
+notedv PITCH_F3, 0x12, 63
+ldelay 0x7
+end
+
+.channel player_child_jump_ice
+ldlayer 0, layer_4F3
+ldlayer 1, layer_3AA
+end
+
+.layer layer_4F1
+transpose -2
+
+.layer layer_4F3
+instr FONT00_INSTR_STEP_ICE
+notedv PITCH_E3, 0x7, 95
+notedv PITCH_B4, 0x12, 95
+ldelay 0x7
+end
+
+.channel player_child_land_dirt
+ldlayer 0, layer_507
+ldlayer 1, layer_512
+end
+
+.layer layer_505
+transpose -2
+
+.layer layer_507
+instr FONT00_INSTR_STEP_GROUND
+notedv PITCH_E4, 0xA, 75
+notedv PITCH_E3, 0xA, 75
+ldelay 0x7
+end
+
+.layer layer_512
+ldelay 0x7
+instr FONT00_INSTR_SWORD_HIT_SHIELD
+env envelope_6660, 250
+notedvg PITCH_C5, 0x6, 39, 127
+instr FONT00_INSTR_SWORD_STRIKE
+notedvg PITCH_D4, 0x4, 49, 127
+instr FONT00_INSTR_STEP_FIRE
+notedv PITCH_B3, 0x5, 39
+notedv PITCH_F3, 0x5, 39
+end
+
+.channel player_child_land_sand
+ldlayer 0, layer_536
+ldlayer 1, layer_512
+end
+
+.layer layer_534
+transpose -2
+
+.layer layer_536
+instr FONT00_INSTR_STEP_SAND
+notedv PITCH_A4, 0xA, 75
+notedv PITCH_A3, 0xA, 75
+end
+
+.channel player_child_land_stone
+ldi 20
+stio 1
+ldlayer 0, layer_54B
+ldlayer 1, layer_512
+end
+
+.layer layer_549
+transpose -2
+
+.layer layer_54B
+instr FONT00_INSTR_STEP_ROCK
+notedvg PITCH_GF4, 0xA, 101, 64
+notedvg PITCH_GF3, 0xA, 101, 64
+ldelay 0x7
+end
+
+.channel player_child_land_jabu
+ldlayer 0, layer_561
+ldlayer 1, layer_512
+end
+
+.layer layer_55F
+transpose -2
+
+.layer layer_561
+instr FONT00_INSTR_STEP_JABU
+notedv PITCH_F4, 0xA, 75
+notedv PITCH_F3, 0xA, 75
+ldelay 0x7
+end
+
+.channel player_child_land_water
+ldlayer 0, layer_575
+ldlayer 1, layer_512
+end
+
+.layer layer_573
+transpose -2
+
+.layer layer_575
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_A4, 0xA, 75
+notedv PITCH_A3, 0x1E, 75
+end
+
+.channel player_child_land_water_deep
+ldlayer 0, layer_587
+ldlayer 1, layer_512
+end
+
+.layer layer_585
+transpose -2
+
+.layer layer_587
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_F4, 0xA, 75
+notedv PITCH_F3, 0x1E, 75
+end
+
+.channel player_child_land_tall_grass
+ldlayer 0, layer_599
+ldlayer 1, layer_512
+end
+
+.layer layer_597
+transpose -2
+
+.layer layer_599
+instr FONT00_INSTR_STEP_CARPET_0
+notedv PITCH_A3, 0x6, 56
+instr FONT00_INSTR_STEP_GRASS
+releaserate 225
+notedv PITCH_F4, 0xA, 80
+notedv PITCH_A3, 0x30, 80
+end
+
+.channel player_child_land_lava
+ldlayer 0, layer_5B2
+ldlayer 1, layer_512
+end
+
+.layer layer_5B0
+transpose -2
+
+.layer layer_5B2
+instr FONT00_INSTR_STEP_GROUND
+notedv PITCH_B2, 0x4, 68
+instr FONT00_INSTR_STEP_WATER
+notedv PITCH_F3, 0x6, 75
+notedv PITCH_G2, 0xA, 75
+instr FONT00_INSTR_BOMB
+portamento 0x81, 38, 255
+notedv PITCH_C3, 0x16, 70
+end
+
+.channel player_child_land_grass
+ldlayer 0, layer_5D2
+ldlayer 1, layer_512
+end
+
+.layer layer_5D0
+transpose -2
+
+.layer layer_5D2
+instr FONT00_INSTR_STEP_CARPET_0
+notedv PITCH_E4, 0xA, 75
+notedv PITCH_G3, 0xA, 75
+ldelay 0x7
+end
+
+.channel player_child_land_carpet
+ldlayer 0, layer_5E6
+ldlayer 1, layer_512
+end
+
+.layer layer_5E4
+transpose -2
+
+.layer layer_5E6
+instr FONT00_INSTR_STEP_CARPET_1
+notedv PITCH_B4, 0xA, 90
+notedv PITCH_F3, 0xA, 90
+ldelay 0x7
+end
+
+.channel player_child_land_wood
+ldlayer 0, layer_5FA
+ldlayer 1, layer_512
+end
+
+.layer layer_5F8
+transpose -2
+
+.layer layer_5FA
+instr FONT00_INSTR_STEP_WOOD
+notedv PITCH_AF4, 0xA, 85
+notedv PITCH_AF3, 0x1E, 85
+end
+
+.channel player_child_land_bridge
+ldlayer 0, layer_60C
+ldlayer 1, layer_512
+end
+
+.layer layer_60A
+transpose -2
+
+.layer layer_60C
+instr FONT00_INSTR_STEP_BRIDGE
+notedv PITCH_F4, 0xA, 75
+notedv PITCH_F3, 0x1E, 75
+end
+
+.channel player_land_iron_boots
+instr FONT00_INSTR_STEP_IRON
+ldlayer 0, layer_61B
+end
+
+.layer layer_61B
+notedv PITCH_B3, 0xA, 96
+notedv PITCH_F3, 0x18, 96
+end
+
+.channel player_land_unused
+ldlayer 0, layer_629
+ldlayer 1, layer_512
+end
+
+.layer layer_629
+instr FONT00_INSTR_STEP_SAND
+notedv PITCH_A3, 0x12, 75
+notedv PITCH_A2, 0x12, 75
+end
+
+.channel player_child_land_ice
+ldlayer 0, layer_63B
+ldlayer 1, layer_512
+end
+
+.layer layer_639
+transpose -2
+
+.layer layer_63B
+instr FONT00_INSTR_STEP_ICE
+notedv PITCH_G4, 0x5, 98
+notedv PITCH_E3, 0x12, 98
+end
+
+.channel player_climb_down_vine_top
+instr FONT00_INSTR_DROP
+env envelope_667C
+ldlayer 0, layer_64D
+end
+
+.layer layer_64D
+portamento 1, 48, 0x10
+notedv PITCH_D4, 0x18, 100
+end
+
+.channel player_climb_up_vine_top
+instr FONT00_INSTR_WATER_SPLASH_S
+env envelope_6694
+ldlayer 0, layer_65E
+end
+
+.layer layer_65E
+notedv PITCH_A4, 0x16, 127
+end
+
+.channel player_climb_on_epona
+instr FONT00_INSTR_STEP_CARPET_0
+env envelope_6674
+ldlayer 0, layer_66B
+end
+
+.layer layer_66B
+notedv PITCH_A2, 0xA, 105
+end
+
+.channel player_jump_off_epona
+instr FONT00_INSTR_WATER_SPLASH_S
+env envelope_6694
+ldlayer 0, layer_678
+end
+
+.layer layer_678
+portamento 0x81, 48, 255
+notedv PITCH_C4, 0x20, 60
+end
+
+.channel player_shield_epona
+instr FONT00_INSTR_WATER_SPLASH_S
+env envelope_6688
+ldlayer 0, layer_693
+ldlayer 1, layer_68C
+end
+
+.layer layer_68C
+notedv PITCH_F2, 0x6, 115
+notedv PITCH_C3, 0xC, 115
+end
+
+.layer layer_693
+instr FONT00_INSTR_SWORD_SHEATHE
+portamento 0x81, 20, 255
+notedv PITCH_E3, 0x19, 90
+end
+
+.channel player_change_item_held
+instr FONT00_INSTR_WATER_SPLASH_S
+env envelope_66E0
+ldlayer 0, layer_6A9
+ldlayer 1, layer_6B5
+end
+
+.layer layer_6A9
+notedv PITCH_G3, 0x6, 115
+notedv PITCH_C3, 0xC, 115
+instr FONT00_INSTR_SWORD_SHEATHE
+notedv PITCH_D4, 0xF, 90
+end
+
+.layer layer_6B5
+instr FONT00_INSTR_SWORD_SHEATHE
+portamento 0x81, 31, 255
+notedv PITCH_F2, 0x19, 90
+end
+
+.channel player_catch_boomerang
+instr FONT00_INSTR_STEP_GROUND
+ldlayer 0, layer_6C5
+end
+
+.layer layer_6C5
+portamento 0x81, 27, 200
+notedv PITCH_F3, 0x7, 127
+end
+
+.channel player_large_splash
+instr FONT00_INSTR_WATER_SPLASH
+env envelope_65FC
+releaserate 127
+ldlayer 0, layer_6D8
+end
+
+.layer layer_6D8
+portamento 0x81, 39, 200
+notedv PITCH_F3, 0x91, 100
+end
+
+.channel player_small_splash
+instr FONT00_INSTR_WATER_SPLASH
+env envelope_6610
+ldlayer 0, layer_6EA
+end
+
+.layer layer_6EA
+portamento 0x81, 34, 48
+notedv PITCH_A3, 0x50, 105
+end
+
+.channel player_swim
+ldlayer 0, layer_6F8
+end
+
+.layer layer_unused_6F6
+transpose -6
+
+.layer layer_6F8
+instr FONT00_INSTR_WATER_SWIM
+env envelope_6624, 251
+portamento 0x81, 36, 200
+notedv PITCH_C3, 0x30, 105
+end
+
+.channel player_throw
+instr FONT00_INSTR_SWORD_MISS
+ldlayer 0, layer_70C
+end
+
+.layer layer_70C
+portamento 0x81, 27, 255
+notedv PITCH_C2, 0x18, 100
+end
+
+.channel player_hit_wall_old
+gain 15
+ldlayer 0, layer_71A
+end
+
+.layer layer_71A
+call layer_fn_725
+portamento 0x81, 45, 255
+notedv PITCH_B2, 0xE, 115
+end
+
+.layer layer_fn_725
+instr FONT00_INSTR_SLAM_GUNSHOT
+env envelope_66B0, 245
+end
+
+.layer layer_unused_72C
+transpose 2
+jump layer_800
+
+.channel player_flip
+instr FONT00_INSTR_SWORD_MISS
+ldlayer 0, layer_737
+end
+
+.layer layer_737
+legato
+portamento 0x85, 29, 225
+notedv PITCH_D2, 0x8, 100
+notedv PITCH_D1, 0x14, 100
+end
+
+.channel player_sidejump
+ldlayer 0, layer_747
+end
+
+.layer layer_747
+instr FONT00_INSTR_SWORD_MISS
+releaserate 248
+portamento 0x81, 26, 225
+notedv PITCH_GF1, 0xC, 100
+end
+
+.channel player_hit_blunt
+gain 20
+ldlayer 0, layer_1B3F
+ldlayer 1, layer_71A
+ldlayer 2, layer_75F
+end
+
+.layer layer_75F
+call layer_fn_725
+portamento 0x85, 34, 255
+notedv PITCH_BF3, 0x7, 110
+end
+
+.channel player_hit_stab
+instr FONT00_INSTR_SWORD_SWING
+env envelope_66C8
+ldlayer 0, layer_776
+ldlayer 1, layer_785
+end
+
+.layer layer_776
+portamento 0x81, 55, 127
+notedv PITCH_DF1, 0x8, 115
+portamento 0x81, 6, 255
+notedv PITCH_AF3, 0xB, 105
+end
+
+.layer layer_785
+instr FONT00_INSTR_WHISTLE_AIR
+portamento 0x81, 49, 222
+notedv PITCH_BF2, 0x8, 115
+portamento 0x81, 19, 255
+notedv PITCH_F3, 0xC, 115
+end
+
+.channel player_slip_dirt
+ldlayer 0, layer_79D
+ldlayer 1, layer_E0C
+end
+
+.layer layer_79D
+ldelay 0x30
+end
+
+.channel player_slip_sand
+ldlayer 0, layer_79D
+ldlayer 1, layer_E1C
+end
+
+.channel player_slip_stone
+ldlayer 0, layer_79D
+ldlayer 1, layer_E24
+end
+
+.channel player_slip_jabu
+ldlayer 0, layer_79D
+ldlayer 1, layer_E34
+end
+
+.channel player_slip_water
+ldlayer 0, layer_79D
+ldlayer 1, layer_E34
+end
+
+.channel player_slip_water_deep
+ldlayer 0, layer_79D
+ldlayer 1, layer_E34
+end
+
+.channel player_slip_tall_grass
+ldlayer 0, layer_79D
+ldlayer 1, layer_E3C
+end
+
+.channel player_slip_lava
+ldlayer 0, layer_79D
+ldlayer 1, layer_E34
+end
+
+.channel player_slip_grass
+ldlayer 0, layer_79D
+ldlayer 1, layer_E4C
+end
+
+.channel player_slip_carpet
+ldlayer 0, layer_79D
+ldlayer 1, layer_E0C
+end
+
+.channel player_slip_wood
+ldlayer 0, layer_79D
+ldlayer 1, layer_E54
+end
+
+.channel player_slip_bridge
+ldlayer 0, layer_79D
+ldlayer 1, layer_E54
+end
+
+.channel player_slip_unused
+ldlayer 0, layer_79D
+ldlayer 1, layer_E64
+end
+
+.channel player_rebound_dirt
+ldlayer 1, layer_80C
+.channel chan_7F7
+gain 25
+ldlayer 2, layer_512
+
+.channel player_rebound_unarmed
+ldlayer 0, layer_800
+end
+
+.layer layer_800
+call layer_fn_725
+portamento 0x81, 38, 200
+notedvg PITCH_BF3, 0x24, 115, 100
+end
+
+.layer layer_80C
+transpose -6
+jump layer_507
+
+.channel player_rebound_sand
+ldlayer 1, layer_816
+rjump chan_7F7
+
+.layer layer_816
+transpose -6
+jump layer_536
+
+.channel player_rebound_stone
+ldlayer 1, layer_820
+rjump chan_7F7
+
+.layer layer_820
+transpose -6
+jump layer_54B
+
+.channel player_rebound_jabu
+ldlayer 1, layer_82A
+rjump chan_7F7
+
+.layer layer_82A
+transpose -6
+jump layer_561
+
+.channel player_rebound_water
+ldlayer 1, layer_834
+rjump chan_7F7
+
+.layer layer_834
+transpose -6
+jump layer_575
+
+.channel chan_unused_839
+rjump chan_7F7
+
+.channel player_rebound_water_deep
+ldlayer 1, layer_840
+rjump chan_7F7
+
+.layer layer_840
+transpose -6
+jump layer_587
+
+.channel player_rebound_tall_grass
+ldlayer 1, layer_84A
+rjump chan_7F7
+
+.layer layer_84A
+transpose -6
+jump layer_599
+
+.channel player_rebound_lava
+ldlayer 1, layer_854
+rjump chan_7F7
+
+.layer layer_854
+transpose -6
+jump layer_5B2
+
+.channel player_rebound_grass
+ldlayer 1, layer_85E
+rjump chan_7F7
+
+.layer layer_85E
+transpose -6
+jump layer_5D2
+
+.channel player_rebound_carpet
+ldlayer 1, layer_868
+rjump chan_7F7
+
+.layer layer_868
+transpose -6
+jump layer_5E6
+
+.channel player_rebound_wood
+ldlayer 1, layer_872
+rjump chan_7F7
+
+.layer layer_872
+transpose -6
+jump layer_5FA
+
+.channel player_rebound_bridge
+ldlayer 1, layer_87D
+jump chan_7F7
+
+.layer layer_87D
+transpose -6
+jump layer_60C
+
+.channel player_rebound_unused
+ldlayer 1, layer_888
+jump chan_7F7
+
+.layer layer_888
+transpose -6
+jump layer_629
+
+.channel player_rebound_ice
+ldlayer 1, layer_893
+jump chan_7F7
+
+.layer layer_893
+transpose -6
+jump layer_63B
+
+.channel player_dive_surface
+ldlayer 0, layer_89C
+end
+
+.layer layer_89C
+instr FONT00_INSTR_WATER_SPLISH
+env envelope_66EC, 251
+portamento 0x81, 39, 255
+notedv PITCH_C5, 0x18, 100
+instr FONT00_INSTR_WATER_SPLASH
+env envelope_67A4, 221
+portamento 0x81, 32, 200
+notedv PITCH_C4, 0x3C, 100
+end
+
+.channel player_dive_down
+ldlayer 0, layer_8BB
+end
+
+.layer layer_8BB
+instr FONT00_INSTR_WATER_BUBBLES
+env envelope_65FC, 221
+portamento 1, 46, 72
+notedv PITCH_G3, 0xDC, 100
+end
+
+.channel player_dive_move
+ldlayer 0, layer_8CE
+end
+
+.layer layer_8CE
+instr FONT00_INSTR_WATER_BUBBLES
+env envelope_65D8, 251
+portamento 0x81, 39, 255
+notedv PITCH_E4, 0x60, 100
+end
+
+.channel player_child_metalequip
+ldlayer 0, layer_2AD
+end
+
+.channel player_adult_metalequip
+ldlayer 0, layer_B7D
+end
+
+.channel player_electric_shock
+instr FONT00_INSTR_POTTERY_ELECTRIC
+env envelope_6674
+ldlayer 0, layer_903
+.channel chan_8EC
+rand 10
+stseq 2, layer_903+1
+stseq 2, chan_8FC+1
+rand 12
+stseq 92, layer_903
+.channel chan_8FC
+ldi 1
+call delay_varyingvol
+rjump chan_8EC
+
+.layer layer_903
+notedv PITCH_C3, 0x50, 80
+ldelay 0x5
+rjump layer_903
+
+.channel player_lift_grass
+ldlayer 1, layer_936
+ldlayer 0, layer_911
+end
+
+.layer layer_911
+instr FONT00_INSTR_STEP_GROUND
+notedv PITCH_A3, 0xA, 64
+instr FONT00_INSTR_STEP_GRASS
+notedv PITCH_D4, 0x18, 90
+end
+
+.channel player_lift_rock
+gain 20
+ldlayer 0, layer_927
+ldlayer 1, layer_936
+end
+
+.layer layer_925
+transpose -4
+
+.layer layer_927
+instr FONT00_INSTR_STEP_GROUND
+portamento 0x83, 27, 255
+notedv PITCH_E2, 0x6, 80
+instr FONT00_INSTR_STEP_CARPET_0
+notedv PITCH_E3, 0xF, 95
+end
+
+.layer layer_936
+instr FONT00_INSTR_EXPLOSION_0
+portamento 0x81, 22, 255
+notedv PITCH_A5, 0x1E, 50
+end
+
+.channel player_morpha_bubble
+ldlayer 0, layer_944
+end
+
+.layer layer_944
+instr FONT00_INSTR_WATER_BUBBLES
+legato
+.layer layer_947
+portamento 0x81, 15, 255
+notedv PITCH_E2, 0x60, 75
+rjump layer_947
+
+.channel player_lift_giant_rock
+gain 20
+ldlayer 0, layer_925
+ldlayer 1, layer_2D55
+end
+
+.channel player_sword_charge
+instr FONT00_INSTR_SYNTH
+env envelope_66EC
+ldlayer 0, layer_962
+end
+
+.layer layer_962
+portamento 0x81, 36, 255
+notedv PITCH_C4, 0x64, 95
+end
+
+.channel player_freeze
+gain 30
+ldlayer 0, layer_973
+ldlayer 1, layer_97E
+end
+
+.layer layer_973
+instr FONT00_INSTR_FIRE_WIND
+portamento 0x81, 43, 255
+notedv PITCH_E3, 0xB4, 105
+end
+
+.layer layer_97E
+instr FONT00_INSTR_CLOTH_TEAR
+portamento 0x81, 20, 255
+notedv PITCH_B1, 0xB4, 88
+end
+
+.channel player_lift_pot
+ldlayer 0, layer_990
+ldlayer 1, layer_99A
+end
+
+.layer layer_990
+transpose 50
+.layer layer_992
+instr FONT00_INSTR_POTTERY_ELECTRIC
+notedv PITCH_C2, 0x6, 72
+end
+
+.layer layer_998
+transpose -4
+
+.layer layer_99A
+instr FONT00_INSTR_STEP_IRON
+notedv PITCH_B3, 0x3, 110
+end
+
+.channel player_hit_unused
+ldlayer 0, layer_9A4
+end
+
+.layer layer_9A4
+instr FONT00_INSTR_SLAM_GUNSHOT
+env envelope_664C, 253
+notedv PITCH_BF3, 0x5, 100
+end
+
+.channel player_idle_shuffle
+ldlayer 0, layer_9B2
+end
+
+.layer layer_9B2
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_66E0, 251
+notedv PITCH_EF3, 0xA, 80
+end
+
+.channel player_idle_slide
+ldlayer 0, layer_9C0
+end
+
+.layer layer_9C0
+instr FONT00_INSTR_WATER_SPLASH
+env envelope_66E0, 251
+notedv PITCH_C3, 0x15, 80
+end
+
+.channel player_dive_unused
+ldlayer 0, layer_9CE
+end
+
+.layer layer_9CE
+instr FONT00_INSTR_WATER_SPLISH
+env envelope_66EC, 251
+portamento 0x81, 39, 255
+notedv PITCH_C3, 0xC, 100
+instr FONT00_INSTR_WATER_SPLASH
+env envelope_67A4, 221
+portamento 0x81, 36, 200
+notedv PITCH_C3, 0x3C, 100
+end
+
+.channel player_freeze_short
+gain 30
+ldlayer 0, layer_9F2
+ldlayer 1, layer_9FC
+end
+
+.layer layer_9F2
+instr FONT00_INSTR_FIRE_WIND
+portamento 0x81, 43, 255
+notedv PITCH_E3, 0x1C, 105
+end
+
+.layer layer_9FC
+instr FONT00_INSTR_CLOTH_TEAR
+portamento 0x81, 20, 255
+notedv PITCH_B1, 0x1C, 88
+end
+
+.channel player_ice_break
+ldlayer 0, layer_A0A
+end
+
+.layer layer_A0A
+instr FONT00_INSTR_CHATTER
+transpose 48
+notedv PITCH_F3, 0x14, 100
+notedv PITCH_A3, 0x0, 105
+end
+
+.channel player_slip_ice
+instr FONT00_INSTR_SLIDE_HEAVY
+env envelope_66FC
+ldlayer 0, layer_A1E
+end
+
+.layer layer_A1E
+notedv PITCH_DF4, 0x7D00, 64
+end
+
+.channel player_sheathe_item_unused
+instr FONT00_INSTR_WATER_SPLASH_S
+env envelope_66EC
+ldlayer 0, layer_A2C
+end
+
+.layer layer_A2C
+notedv PITCH_F3, 0x5, 75
+notedv PITCH_BF2, 0xA, 75
+notedv PITCH_BF2, 0x11, 75
+end
+
+.channel player_lift_crate
+ldlayer 0, layer_A3A
+end
+
+.layer layer_A3A
+instr FONT00_INSTR_STICK_ATTACK
+notedv PITCH_A2, 0x6, 100
+end
+
+.channel player_cast_fire
+ldlayer 0, layer_A4C
+ldlayer 1, layer_A5D
+ldlayer 2, layer_A6E
+jump chan_118F
+
+.layer layer_A4C
+instr FONT00_INSTR_FLAME_THUNDER
+releaserate 221
+legato
+portamento 0x85, 0, 255
+notedv PITCH_A2, 0xFA, 74
+notedv PITCH_A4, 0x64, 74
+end
+
+.layer layer_A5D
+instr FONT00_INSTR_EXPLOSION_0
+releaserate 221
+noteldv PITCH_A3, 0x1E, 100
+portamento 0x81, 0, 255
+notedv PITCH_A3, 0x140, 85
+end
+
+.layer layer_A6E
+instr FONT00_INSTR_FAIRY_MAGIC
+releaserate 221
+portamento 0x81, 0, 255
+notedv PITCH_A4, 350, 80
+end
+
+.channel player_cast_wind
+ldlayer 0, layer_A85
+ldlayer 1, layer_A9E
+ldlayer 2, layer_AAF
+end
+
+.layer layer_A85
+call layer_fn_A95
+legato
+portamento 0x85, 62, 255
+notedv PITCH_C4, 0x3C, 85
+notedv PITCH_F5, 500, 85
+end
+
+.layer layer_fn_A95
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_6808, 200
+transpose 12
+end
+
+.layer layer_A9E
+portamento 0x81, 32, 255
+instr FONT00_INSTR_SLIDE_LINK
+transpose 24
+env envelope_66F4, 200
+notedv PITCH_F5, 0x230, 40
+end
+
+.layer layer_AAF
+instr FONT00_INSTR_WARP
+transpose 12
+env envelope_67D8, 200
+notedv PITCH_F5, 0x230, 70
+end
+
+.channel player_cast_wind_return
+instr FONT00_INSTR_WARP
+gain 15
+ldlayer 0, layer_2130
+ldlayer 1, layer_2124
+ldlayer 2, layer_2D3A
+ldi 80
+call delay_varyingvol
+ldlayer 0, layer_AD5
+ldlayer 2, layer_210B
+end
+
+.layer layer_AD5
+ldelay 0x30
+end
+
+.channel player_cast_soul
+ldi 0
+.channel chan_ADA
+stseq 244, layer_AFD+1
+stseq 12, layer_AF2+1
+vibfreq 255
+instr FONT00_INSTR_WARP
+env envelope_6818
+releaserate 235
+ldlayer 0, layer_AFD
+ldlayer 1, layer_AF2
+end
+
+.layer layer_AF2
+transpose 36
+portamento 0x83, 44, 127
+.layer layer_AF8
+notedv PITCH_A4, 0x60, 64
+rjump layer_AF8
+
+.layer layer_AFD
+transpose 12
+portamento 0x83, 44, 127
+.layer layer_B03
+notedv PITCH_A4, 0x60, 64
+rjump layer_B03
+
+.channel player_arrow_fire_charge
+ldlayer 0, layer_B23
+ldlayer 2, layer_B1D
+ldi 1
+call delay_varyingvol
+ldlayer 1, layer_B2F
+vibfreq 96
+vibdepthgrad 128, 128, 0
+end
+
+.layer layer_B1D
+instr FONT00_INSTR_IGNITE
+notedv PITCH_A3, 0x0, 110
+end
+
+.layer layer_B23
+instr FONT00_INSTR_WIND_HOWL_S
+env envelope_66FC, 245
+legato
+.layer layer_B2A
+notedv PITCH_A3, 0x64, 74
+rjump layer_B2A
+
+.layer layer_B2F
+instr FONT00_INSTR_FAIRY_MAGIC
+legato
+.layer layer_B32
+notedv PITCH_D3, 0x0, 35
+rjump layer_B32
+
+.channel player_arrow_ice_charge
+ldlayer 0, layer_B47
+ldlayer 1, layer_B41
+ldlayer 2, layer_B57
+end
+
+.layer layer_B41
+instr FONT00_INSTR_WARP
+transpose 16
+rjump layer_B49
+
+.layer layer_B47
+instr FONT00_INSTR_SHIMMER
+.layer layer_B49
+env envelope_6818, 245
+legato
+portamento 0x81, 39, 200
+.layer layer_B52
+notedv PITCH_E4, 0x3C, 60
+rjump layer_B52
+
+.layer layer_B57
+instr FONT00_INSTR_IGNITE
+notedv PITCH_F4, 0x0, 110
+end
+
+.channel player_arrow_light_charge
+ldlayer 0, layer_B6D
+ldlayer 1, layer_B67
+ldlayer 2, layer_B57
+end
+
+.layer layer_B67
+instr FONT00_INSTR_WARP
+transpose 16
+rjump layer_B6F
+
+.layer layer_B6D
+instr FONT00_INSTR_FAIRY
+.layer layer_B6F
+env envelope_66C8, 240
+legato
+.layer layer_B74
+notedv PITCH_G4, 0x51, 42
+rjump layer_B74
+
+.channel player_adult_step_dirt
+ldlayer 0, layer_2A5
+end
+
+.layer layer_B7D
+ldelay 0x8
+transpose -6
+instr FONT00_INSTR_SWORD_SHEATHE
+releaserate 255
+notedvg PITCH_BF3, 0x4, 64, 64
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_DF3, 0x5, 24
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+notedv PITCH_AF3, 0x4, 38
+end
+
+.channel player_adult_step_sand
+ldlayer 0, layer_2C1
+end
+
+.channel player_adult_step_stone
+ldlayer 0, layer_2D0
+end
+
+.channel player_adult_step_jabu
+ldlayer 0, layer_2DC
+end
+
+.channel player_adult_step_water
+ldlayer 0, layer_2EC
+end
+
+.channel player_adult_step_water_deep
+ldlayer 0, layer_2F8
+end
+
+.channel player_adult_step_tall_grass
+ldlayer 0, layer_304
+end
+
+.channel player_adult_step_lava
+ldlayer 0, layer_317
+end
+
+.channel player_adult_step_grass
+ldlayer 0, layer_331
+end
+
+.channel player_adult_step_carpet
+ldlayer 0, layer_341
+end
+
+.channel player_adult_step_wood
+ldlayer 0, layer_34D
+end
+
+.channel player_adult_step_bridge
+ldlayer 0, layer_359
+end
+
+.channel player_adult_step_vine
+ldlayer 0, layer_368
+ldlayer 1, layer_B7D
+end
+
+.channel player_adult_step_ice
+ldlayer 0, layer_38E
+end
+
+.channel player_adult_jump_dirt
+instr FONT00_INSTR_STEP_GROUND
+ldlayer 0, layer_39F
+ldlayer 1, layer_BD6
+end
+
+.layer layer_BD6
+ldelay 0x8
+instr FONT00_INSTR_SWORD_SHEATHE
+releaserate 255
+notedvg PITCH_C4, 0x4, 90, 64
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_E3, 0x5, 38
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+notedv PITCH_C4, 0x4, 55
+end
+
+.channel player_adult_jump_sand
+ldlayer 0, layer_3CC
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_stone
+ldlayer 0, layer_3E3
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_jabu
+ldlayer 0, layer_3F9
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_water
+ldlayer 0, layer_40D
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_water_deep
+ldlayer 0, layer_41F
+end
+
+.channel player_adult_jump_tall_grass
+ldlayer 0, layer_431
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_lava
+ldlayer 0, layer_44A
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_grass
+ldlayer 0, layer_46C
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_carpet
+ldlayer 0, layer_480
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_wood
+ldlayer 0, layer_494
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_bridge
+ldlayer 0, layer_4A6
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_jump_ice
+ldlayer 0, layer_4F1
+ldlayer 1, layer_BD6
+end
+
+.channel player_adult_land_dirt
+ldlayer 0, layer_505
+ldlayer 1, layer_C45
+end
+
+.layer layer_C45
+ldelay 0x8
+instr FONT00_INSTR_SWORD_SHEATHE
+releaserate 255
+notedvg PITCH_D4, 0x4, 90, 64
+instr FONT00_INSTR_SWORD_STRIKE
+notedv PITCH_D3, 0x5, 38
+instr FONT00_INSTR_SWORD_STRIKE
+transpose 48
+notedv PITCH_BF3, 0x4, 55
+end
+
+.channel player_adult_land_sand
+ldlayer 0, layer_534
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_stone
+ldlayer 0, layer_549
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_jabu
+ldlayer 0, layer_55F
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_water
+ldlayer 0, layer_573
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_water_deep
+ldlayer 0, layer_585
+end
+
+.channel player_adult_land_tall_grass
+ldlayer 0, layer_597
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_lava
+ldlayer 0, layer_5B0
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_grass
+ldlayer 0, layer_5D0
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_carpet
+ldlayer 0, layer_5E4
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_wood
+ldlayer 0, layer_5F8
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_bridge
+ldlayer 0, layer_60A
+ldlayer 1, layer_C45
+end
+
+.channel player_adult_land_ice
+ldlayer 0, layer_639
+ldlayer 1, layer_C45
+end
+
+.channel player_crawl_dirt
+ldlayer 0, layer_2A5
+ldi 2
+call delay_varyingvol
+jump player_slip_dirt
+
+.channel player_crawl_sand
+ldlayer 0, layer_2C1
+ldi 5
+call delay_varyingvol
+jump player_slip_sand
+
+.channel player_crawl_stone
+ldlayer 0, layer_2D0
+ldi 2
+call delay_varyingvol
+jump player_slip_stone
+
+.channel player_crawl_jabu
+ldlayer 0, layer_2DC
+ldi 5
+call delay_varyingvol
+jump player_slip_jabu
+
+.channel player_crawl_water
+ldlayer 0, layer_2EC
+ldi 5
+call delay_varyingvol
+jump player_slip_water
+
+.channel player_crawl_water_deep
+ldlayer 0, layer_2F8
+ldi 5
+call delay_varyingvol
+jump player_slip_water_deep
+
+.channel player_crawl_tall_grass
+ldlayer 0, layer_304
+ldi 5
+call delay_varyingvol
+jump player_slip_tall_grass
+
+.channel player_crawl_lava
+ldlayer 0, layer_317
+ldi 5
+call delay_varyingvol
+jump player_slip_lava
+
+.channel player_crawl_grass
+ldlayer 0, layer_331
+ldi 5
+call delay_varyingvol
+jump player_slip_grass
+
+.channel player_crawl_carpet
+ldlayer 0, layer_341
+ldi 5
+call delay_varyingvol
+jump player_slip_carpet
+
+.channel player_crawl_wood
+ldlayer 0, layer_34D
+ldi 5
+call delay_varyingvol
+jump player_slip_wood
+
+.channel player_crawl_bridge
+ldlayer 0, layer_359
+ldi 1
+call delay_varyingvol
+jump player_slip_bridge
+
+.channel player_crawl_ice
+ldlayer 0, layer_38E
+ldi 5
+call delay_varyingvol
+jump player_slip_stone
+
+.channel player_cast_soul_end
+vibdepth 20
+ldi 4
+jump chan_ADA
+
+.channel player_roll_dust
+ldlayer 0, layer_D47
+end
+
+.layer layer_D47
+instr FONT00_INSTR_SLIDE_BLOCK
+env envelope_66A0, 235
+notedv PITCH_F4, 0xA, 90
+notedv PITCH_G4, 0xE, 90
+notedv PITCH_B4, 0x7F, 75
+end
+
+.channel player_crash_unused
+ldlayer 0, layer_D5E
+ldlayer 1, layer_1B3F
+end
+
+.layer layer_D5E
+instr FONT00_INSTR_MECH_CHARGE
+env envelope_65D8, 228
+notedv PITCH_C5, 0x64, 100
+end
+
+.channel player_cast_soul_appear
+instr FONT00_INSTR_WARP
+ldlayer 0, layer_D74
+ldlayer 1, layer_29FC
+ldlayer 2, layer_2A01
+end
+
+.layer layer_D74
+instr FONT00_INSTR_SHIMMER
+portamento 0x81, 39, 45
+notedv PITCH_E4, 0x118, 60
+end
+
+.channel player_fairy_heal
+ldlayer 0, layer_D8A
+ldlayer 1, layer_D9A
+vibfreq 192
+vibdepth 32
+end
+
+.layer layer_D8A
+instr FONTANY_INSTR_SQUARE
+env envelope_6818, 221
+legato
+portamento 0x81, 36, 64
+.layer layer_D95
+notedv PITCH_A4, 0x78, 34
+rjump layer_D95
+
+.layer layer_D9A
+instr FONT00_INSTR_FAIRY
+env envelope_66FC, 237
+portamento 0x83, 36, 255
+.layer layer_DA4
+notedv PITCH_C4, 0x14, 85
+rjump layer_DA4
+
+.channel player_plant_grow
+ldlayer 0, layer_DB8
+ldlayer 1, layer_DB6
+.channel chan_DAF
+vibfreqgrad 10, 100, 8
+vibdepth 15
+end
+
+.layer layer_DB6
+transpose 24
+
+.layer layer_DB8
+portamento 0x81, 15, 255
+
+.layer layer_DBC
+instr FONTANY_INSTR_4PULSE
+env envelope_6674, 251
+legato
+.layer layer_DC3
+notedv PITCH_C4, 500, 35
+rjump layer_DC3
+
+.channel player_plant_seed
+ldlayer 0, layer_DB6
+rjump chan_DAF
+
+.channel player_cast_wind_dismiss
+instr FONT00_INSTR_WARP
+ldlayer 0, layer_DD7
+ldlayer 1, layer_2A01
+end
+
+.layer layer_DD7
+transpose 30
+legato
+portamento 0x81, 43, 64
+notedv PITCH_D4, 0xAA, 80
+end
+
+.channel player_hover
+instr FONT00_INSTR_WARP
+vibdepth 9
+vibfreq 128
+env envelope_6818
+releaserate 235
+ldlayer 0, layer_DF2
+end
+
+.layer layer_DF2
+legato
+.layer layer_DF3
+notedv PITCH_E5, 0x7D00, 95
+rjump layer_DF3
+
+.channel player_plant_hover
+ldlayer 0, layer_DBC
+ldlayer 1, layer_E04
+vibfreq 100
+vibdepth 15
+end
+
+.layer layer_E04
+transpose 24
+rjump layer_DBC
+
+.channel player_slip_dirt2
+ldlayer 0, layer_E0C
+end
+
+.layer layer_E0C
+instr FONT00_INSTR_SLIDE_BLOCK
+.layer layer_E0E
+env envelope_6704, 251
+legato
+.layer layer_E13
+notedv PITCH_C4, 0x7F, 88
+rjump layer_E13
+
+.channel player_slip_sand2
+ldlayer 0, layer_E1C
+end
+
+.layer layer_E1C
+instr FONT00_INSTR_SLIDE_LINK
+rjump layer_E0E
+
+.channel player_slip_stone2
+ldlayer 0, layer_E24
+end
+
+.layer layer_E24
+instr FONT00_INSTR_SLIDE_HEAVY
+env envelope_6704, 251
+legato
+.layer layer_E2B
+notedv PITCH_F4, 0x7F, 80
+rjump layer_E2B
+
+.channel player_slip_jabu2
+ldlayer 0, layer_E34
+end
+
+.layer layer_E34
+instr FONT00_INSTR_SLIDE_WET
+rjump layer_E0E
+
+.channel player_slip_lava2
+ldlayer 0, layer_E3C
+end
+
+.layer layer_E3C
+instr FONT00_INSTR_SLIDE_WET
+env envelope_6704, 251
+legato
+.layer layer_E43
+notedv PITCH_C4, 0x7F, 86
+rjump layer_E43
+
+.channel player_slip_grass2
+ldlayer 0, layer_E4C
+end
+
+.layer layer_E4C
+instr FONT00_INSTR_DISTORTION
+rjump layer_E0E
+
+.channel player_slip_unused2
+ldlayer 0, layer_E54
+end
+
+.layer layer_E54
+instr FONT00_INSTR_SLIDE_HEAVY
+env envelope_6704, 251
+legato
+.layer layer_E5B
+notedv PITCH_AF3, 0x7F, 80
+rjump layer_E5B
+
+.channel player_slip_iron_boots_unused
+ldlayer 0, layer_E64
+end
+
+.layer layer_E64
+instr FONT00_INSTR_SLIDE_LINK
+env envelope_6704, 251
+legato
+.layer layer_E6B
+notedv PITCH_DF3, 0x7F, 95
+rjump layer_E6B
+
+.filter filter_player0
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter filter_player1
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter filter_player2
+filter 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/assets/sequences/sfxbanks/system.seq.inc b/assets/sequences/sfxbanks/system.seq.inc
new file mode 100644
index 00000000000..55889629757
--- /dev/null
+++ b/assets/sequences/sfxbanks/system.seq.inc
@@ -0,0 +1,1117 @@
+.table table_system
+entry system_menu_open
+entry system_menu_close
+entry system_puzzle_solved
+entry system_rupee
+entry system_timer_ding
+entry system_error
+entry system_error
+entry system_treasure_appear
+entry system_item_equipped
+entry system_cursor
+entry system_cursor_cancel
+entry system_heart
+entry system_z_shift
+entry system_menu_unused_down
+entry system_map_select_cursor_old
+entry system_z_cancel
+entry system_z_lock
+entry system_menu_unused_down
+entry system_menu_unused_up
+entry system_camera_mode_toggle
+entry system_minimap_toggle
+entry system_camera_mode_toggle
+entry system_camera_mode_toggle
+entry system_z_shift_old
+entry system_message_advance
+entry system_countdown_caution
+entry system_countdown_warn
+entry system_low_health
+entry system_explosive_boom
+entry system_explosive_boom
+entry system_navi_call
+entry system_magic_refill
+entry system_z_lock_old
+entry system_unused21
+entry system_unused22
+entry system_title_screen
+entry system_get_item
+entry system_menu_scroll_left
+entry system_menu_scroll_right
+entry system_ocarina_system_error
+entry system_camera_mode_toggle_old
+entry system_minimap_toggle_old
+entry system_lens_on
+entry system_lens_off
+entry system_gerudo_whistle
+entry system_minigame_bell
+entry system_message_done
+entry system_rupee_increase
+entry system_z_lock_enemy
+entry system_get_treasure_item
+entry system_long_whiteout
+entry system_whiteout
+entry system_warp_in
+entry system_shotgun
+entry system_metronome
+entry system_z_shift_threat
+entry system_metronome2
+entry system_file_cursor
+entry system_file_select
+entry system_file_enter
+entry system_file_cancel
+entry system_file_error
+entry system_equip_fire
+entry system_equip_ice
+entry system_equip_light
+entry system_equip_magic_bow
+entry system_metronome3
+entry system_skulltula_token_appears
+entry system_silver_rupee
+entry system_carrot_recovered
+entry system_metronome
+entry system_z_shift_threat
+
+.channel system_menu_open
+instr FONTANY_INSTR_SAWTOOTH
+env envelope_6660
+releaserate 240
+ldlayer 0, layer_57C7
+ldlayer 1, layer_57DF
+end
+
+.layer layer_57C7
+instr FONT00_INSTR_DING
+transpose 12
+releaserate 225
+notepan 54
+notedv PITCH_BF3, 0xC, 73
+notedv PITCH_C4, 0xC, 73
+notedv PITCH_D4, 0xC, 73
+notedv PITCH_EF4, 0xC, 73
+notedv PITCH_F4, 0x18, 73
+end
+
+.layer layer_57DF
+instr FONT00_INSTR_DING
+transpose 24
+env envelope_65D8, 245
+notepan 74
+portamento 0x81, 20, 255
+notedv PITCH_F3, 0x18, 73
+ldelay 0x4
+notedv PITCH_F3, 0x18, 73
+end
+
+.channel system_menu_close
+instr FONTANY_INSTR_SAWTOOTH
+env envelope_6660
+releaserate 240
+ldlayer 0, layer_5804
+ldlayer 1, layer_581C
+end
+
+.layer layer_5804
+instr FONT00_INSTR_DING
+releaserate 225
+transpose 12
+notepan 54
+notedv PITCH_F4, 0x4, 73
+notedv PITCH_EF4, 0x4, 73
+notedv PITCH_D4, 0x4, 73
+notedv PITCH_C4, 0x4, 73
+notedv PITCH_BF3, 0xC, 73
+end
+
+.layer layer_581C
+instr FONT00_INSTR_DING
+transpose 24
+env envelope_65D8, 245
+notepan 74
+portamento 0x81, 20, 255
+notedv PITCH_F3, 0xC, 73
+ldelay 0x4
+notedv PITCH_F3, 0xC, 73
+end
+
+.channel system_puzzle_solved
+instr FONTANY_INSTR_SQUARE
+env envelope_664C
+releaserate 248
+ldlayer 0, layer_5841
+ldlayer 1, layer_5850
+end
+
+.layer layer_5841
+notepan 54
+notedv PITCH_G4, 0x18, 75
+notedv PITCH_EF4, 0x18, 75
+notedv PITCH_AF3, 0x18, 75
+notedv PITCH_AF4, 0x30, 75
+end
+
+.layer layer_5850
+notepan 74
+ldelay 0xC
+notedv PITCH_GF4, 0x18, 75
+notedv PITCH_A3, 0x18, 75
+notedv PITCH_E4, 0x18, 75
+notedv PITCH_C5, 0x30, 75
+end
+
+.channel system_rupee
+ldlayer 0, layer_5868
+ldlayer 1, layer_587A
+end
+
+.layer layer_5868
+instr FONTANY_INSTR_SAWTOOTH
+env envelope_6660, 250
+transpose 24
+notedv PITCH_BF4, 0x6, 80
+notedv PITCH_F4, 0x6, 80
+notedv PITCH_BF4, 0x18, 80
+end
+
+.layer layer_587A
+instr FONT00_INSTR_RUPEE
+notedv PITCH_C5, 0x24, 72
+end
+
+.channel system_timer_ding
+ldlayer 0, layer_5884
+end
+
+.layer layer_5884
+instr FONTANY_INSTR_TRIANGLE
+env envelope_6720, 250
+notedv PITCH_A4, 0x6, 60
+end
+
+.channel system_error
+ldlayer 0, layer_5892
+end
+
+.layer layer_5892
+instr FONTANY_INSTR_SAWTOOTH
+env envelope_664C, 250
+notedv PITCH_E2, 0x9, 80
+notedv PITCH_E2, 0x24, 80
+end
+
+.channel system_treasure_appear
+instr FONTANY_INSTR_SQUARE
+env envelope_664C
+releaserate 250
+ldlayer 0, layer_58AD
+ldlayer 1, layer_58C3
+end
+
+.layer layer_58AD
+notedv PITCH_A4, 0xC, 70
+notedv PITCH_B4, 0xC, 70
+notedv PITCH_D5, 0xC, 70
+notedv PITCH_E5, 0xC, 70
+notedv PITCH_A5, 0x12, 70
+notedv PITCH_A5, 0x12, 40
+notedv PITCH_A5, 0x12, 15
+end
+
+.layer layer_58C3
+ldelay 0x6
+notepan 34
+notedv PITCH_A4, 0xC, 40
+notepan 94
+notedv PITCH_B4, 0xC, 40
+notepan 34
+notedv PITCH_D5, 0xC, 40
+notepan 94
+notedv PITCH_E5, 0xC, 40
+notepan 34
+notedv PITCH_A5, 0x12, 40
+notepan 94
+notedv PITCH_A5, 0x12, 20
+notepan 64
+notedv PITCH_A5, 0x12, 10
+end
+
+.channel system_item_equipped
+instr FONT00_INSTR_DING
+env envelope_6660
+releaserate 240
+ldlayer 0, layer_58F7
+ldlayer 1, layer_590D
+end
+
+.layer layer_58F7
+notedv PITCH_A4, 0x6, 80
+notedv PITCH_B4, 0x6, 80
+notedv PITCH_D5, 0x6, 80
+notedv PITCH_E5, 0x6, 80
+notedv PITCH_A5, 0x9, 80
+notedv PITCH_A5, 0x9, 50
+notedv PITCH_A5, 0x9, 30
+end
+
+.layer layer_590D
+ldelay 0x6
+notepan 34
+notedv PITCH_A4, 0x6, 55
+notepan 94
+notedv PITCH_B4, 0x6, 55
+notepan 34
+notedv PITCH_D5, 0x6, 55
+notepan 94
+notedv PITCH_E5, 0x6, 55
+notepan 34
+notedv PITCH_A5, 0x9, 55
+notepan 94
+notedv PITCH_A5, 0x9, 45
+notepan 64
+notedv PITCH_A5, 0x9, 30
+end
+
+.channel system_cursor
+ldlayer 0, layer_5937
+end
+
+.layer layer_5937
+instr FONTANY_INSTR_SQUARE
+env envelope_6660, 242
+portamento 0x81, 36, 72
+notedv PITCH_D4, 0xA, 45
+notedv PITCH_D4, 0x6, 45
+end
+
+.channel system_cursor_cancel
+instr FONTANY_INSTR_TRIANGLE
+env envelope_664C
+ldlayer 0, layer_5951
+end
+
+.layer layer_5951
+instr FONTANY_INSTR_TRIANGLE
+env envelope_664C, 250
+notedv PITCH_A4, 0x6, 60
+notedv PITCH_E4, 0x6, 60
+notedv PITCH_D4, 0x6, 60
+notedv PITCH_B3, 0x6, 60
+notedv PITCH_A3, 0x9, 60
+notedv PITCH_B3, 0x6, 20
+notedv PITCH_A3, 0x9, 20
+end
+
+.channel system_heart
+ldlayer 0, layer_5971
+end
+
+.layer layer_5971
+instr FONTANY_INSTR_SINE
+env envelope_6720, 246
+portamento 0x81, 34, 127
+notedv PITCH_A3, 0x8, 100
+portamento 0x81, 46, 127
+notedv PITCH_A4, 0x8, 100
+portamento 0x81, 58, 127
+notedv PITCH_A5, 0x8, 100
+end
+
+.channel system_z_shift
+ldlayer 0, layer_5991
+end
+
+.layer layer_5991
+instr FONT00_INSTR_DING
+env envelope_6688, 251
+portamento 0x81, 36, 192
+notedv PITCH_A5, 0x38, 110
+end
+
+.channel chan_unused_599F
+instr FONTANY_INSTR_SAWTOOTH
+ldlayer 0, layer_59A5
+end
+
+.layer layer_59A5
+notedv PITCH_A4, 0x60, 105
+end
+
+.channel system_map_select_cursor_old
+ldlayer 0, layer_59AD
+end
+
+.layer layer_59AD
+instr FONT00_INSTR_SWORD_STRIKE
+env envelope_664C, 255
+transpose -5
+notedv PITCH_F4, 0x20, 105
+end
+
+.layer layer_unused_59B9
+instr FONT00_INSTR_SWORD_HIT_SHIELD
+env envelope_66B0, 250
+legato
+portamento 0x85, 46, 255
+notedv PITCH_B4, 0x12, 90
+notedv PITCH_E4, 0x8, 90
+end
+
+.channel system_z_cancel
+ldlayer 0, layer_59CF
+end
+
+.layer layer_59CF
+instr FONTANY_INSTR_SQUARE
+transpose 9
+env envelope_6660, 250
+portamento 0x81, 24, 64
+notedv PITCH_D3, 0x2, 65
+notedv PITCH_A2, 0xC, 65
+notedv PITCH_D3, 0x6, 35
+end
+
+.channel system_z_lock
+ldlayer 0, layer_59E9
+end
+
+.layer layer_59E9
+instr FONT00_INSTR_DING
+env envelope_6660, 250
+notedv PITCH_D4, 0x6, 90
+notedv PITCH_G4, 0x6, 90
+notedv PITCH_GF4, 0x6, 90
+notedv PITCH_G4, 0xC, 90
+notedv PITCH_G4, 0xC, 40
+notedv PITCH_G4, 0xC, 20
+end
+
+.channel system_menu_unused_down
+ldlayer 0, layer_5A06
+end
+
+.layer layer_5A06
+instr FONT00_INSTR_DING
+env envelope_6660, 250
+transpose 12
+notedv PITCH_GF4, 0xA, 78
+notedv PITCH_D4, 0xA, 78
+notedv PITCH_B3, 0xA, 78
+notedv PITCH_A3, 0x14, 78
+end
+
+.channel system_menu_unused_up
+ldlayer 0, layer_5A1F
+end
+
+.layer layer_5A1F
+instr FONT00_INSTR_DING
+env envelope_6660, 250
+transpose 12
+notedv PITCH_A3, 0xA, 78
+notedv PITCH_B3, 0xA, 78
+notedv PITCH_D4, 0xA, 78
+notedv PITCH_GF4, 0x14, 78
+end
+
+.channel system_camera_mode_toggle
+ldlayer 0, layer_5A38
+end
+
+.layer layer_5A38
+instr FONT00_INSTR_DING
+env envelope_6660, 250
+transpose 12
+notedv PITCH_D4, 0xA, 78
+notedv PITCH_A3, 0x14, 78
+end
+
+.channel system_minimap_toggle
+ldlayer 0, layer_5A4B
+end
+
+.layer layer_5A4B
+instr FONT00_INSTR_DING
+env envelope_6660, 250
+transpose 12
+notedv PITCH_A3, 0xA, 78
+notedv PITCH_D4, 0x14, 78
+end
+
+.channel system_z_shift_old
+instr FONT00_INSTR_DING
+ldlayer 0, layer_5A60
+end
+
+.layer layer_5A60
+notedv PITCH_EF4, 0xC, 70
+end
+
+.channel system_message_advance
+ldlayer 0, layer_5A68
+end
+
+.layer layer_5A68
+instr FONT00_INSTR_DING
+env envelope_6660, 248
+notedv PITCH_G4, 0x2E, 95
+end
+
+.channel system_countdown_caution
+ldlayer 0, layer_5A76
+end
+
+.layer layer_5A76
+instr FONTANY_INSTR_SAWTOOTH
+env envelope_6660, 250
+notedv PITCH_C4, 0x6, 60
+notedv PITCH_C4, 0x4, 40
+notedv PITCH_C4, 0x4, 20
+end
+
+.channel system_countdown_warn
+reverb 10
+ldlayer 0, layer_5A8C
+end
+
+.layer layer_5A8C
+instr FONTANY_INSTR_SAWTOOTH
+env envelope_6660, 250
+notedv PITCH_C4, 0x6, 65
+notepan 34
+notedv PITCH_C5, 0x4, 45
+notepan 94
+notedv PITCH_C5, 0x4, 45
+notepan 64
+notedv PITCH_C5, 0x4, 30
+end
+
+.channel system_low_health
+ldlayer 0, layer_5AA9
+end
+
+.layer layer_5AA9
+instr FONTANY_INSTR_SAWTOOTH
+env envelope_6660, 248
+notedvg PITCH_DF5, 0xD, 60, 128
+notedv PITCH_DF5, 0xD, 60
+end
+
+.channel system_explosive_boom
+reverb 90
+ldlayer 0, layer_5AC0
+ldlayer 1, layer_5ACC
+end
+
+.layer layer_5AC0
+instr FONT00_INSTR_EXPLOSION_0
+env envelope_6610, 251
+notepan 54
+notedv PITCH_DF4, 0x60, 107
+end
+
+.layer layer_5ACC
+instr FONT00_INSTR_FLAME_THUNDER
+env envelope_6610, 251
+notepan 54
+notedv PITCH_A1, 0x60, 104
+end
+
+.channel system_navi_call
+ldlayer 0, layer_5ADF
+ldlayer 1, layer_5AED
+end
+
+.layer layer_5ADF
+instr FONT00_INSTR_FAIRY_MAGIC
+env envelope_66D0, 246
+portamento 0x81, 58, 246
+notedv PITCH_A4, 0x20, 49
+end
+
+.layer layer_5AED
+instr FONTANY_INSTR_SINE
+env envelope_6660, 248
+notedv PITCH_A5, 0x9, 50
+end
+
+.channel system_magic_refill
+ldi 0
+stio 6
+stseq 0, layer_5B19+1
+ldlayer 0, layer_5B13
+.channel chan_5B01
+ldi 6
+call delay_varyingvol
+ldio 6
+stseq 0, layer_5B19+1
+sub 255
+stio 6
+sub 50
+rbltz chan_5B01
+end
+
+.layer layer_5B13
+instr FONTANY_INSTR_SQUARE
+releaserate 251
+notepan 34
+.layer layer_5B19
+transpose 0
+notedv PITCH_C3, 0x3, 32
+ldelay 0x3
+rjump layer_5B19
+
+.channel system_z_lock_old
+instr FONTANY_INSTR_SINE
+ldlayer 0, layer_5B28
+end
+
+.layer layer_5B28
+legato
+env envelope_6674, 245
+portamento 0x81, 36, 255
+notedv PITCH_F2, 0x8, 68
+portamento 0x81, 20, 225
+notedv PITCH_C4, 0x1C, 68
+end
+
+.channel system_unused21
+instr FONTANY_INSTR_SINE
+ldlayer 0, layer_5B42
+end
+
+.layer layer_5B42
+ldelay 0x1
+end
+
+.layer layer_unused_5B45
+env envelope_6674, 245
+portamento 0x83, 32, 255
+notedv PITCH_F2, 0xC, 80
+notedv PITCH_F2, 0xC, 40
+end
+
+.channel system_unused22
+ldlayer 0, layer_5B58
+end
+
+.layer layer_5B58
+ldelay 0x1
+end
+
+.channel system_title_screen
+instr FONTANY_INSTR_TRIANGLE
+env envelope_664C
+releaserate 240
+ldlayer 0, layer_5B69
+ldlayer 1, layer_5B88
+end
+
+.layer layer_5B69
+notepan 84
+ldelay 0x6
+notedv PITCH_G3, 0xC, 80
+notedv PITCH_C4, 0xC, 80
+notedv PITCH_G4, 0xC, 80
+notedv PITCH_C5, 0xC, 80
+env envelope_6660, 222
+notepan 44
+notedv PITCH_E5, 0x18, 30
+notepan 84
+notedv PITCH_E5, 0x18, 20
+end
+
+.layer layer_5B88
+notepan 44
+notedv PITCH_E3, 0xC, 80
+notedv PITCH_A3, 0xC, 80
+notedv PITCH_E4, 0xC, 80
+notedv PITCH_A4, 0xC, 80
+notepan 64
+notedv PITCH_E5, 0x60, 80
+end
+
+.channel system_get_item
+instr FONTANY_INSTR_TRIANGLE
+env envelope_664C
+releaserate 240
+ldlayer 0, layer_5BA7
+end
+
+.layer layer_5BA7
+call layer_fn_5BB4
+.layer layer_5BAA
+notedv PITCH_AF4, 0xA, 75
+notedv PITCH_AF4, 0x14, 55
+notedv PITCH_AF4, 0x14, 35
+end
+
+.layer layer_fn_5BB4
+notedv PITCH_AF4, 0xA, 75
+notedv PITCH_F4, 0xA, 75
+notedv PITCH_DF4, 0xA, 75
+end
+
+.channel system_menu_scroll_left
+instr FONT00_INSTR_DING
+env envelope_664C
+releaserate 245
+ldlayer 0, layer_5BCC
+ldlayer 1, layer_5BE1
+end
+
+.layer layer_5BCC
+notepan 24
+.layer layer_5BCE
+notedv PITCH_F4, 0x8, 70
+notedv PITCH_BF4, 0x8, 70
+notedv PITCH_A4, 0x8, 70
+notedv PITCH_G4, 0x8, 70
+notedv PITCH_F4, 0x10, 70
+notedv PITCH_F4, 0x20, 35
+end
+
+.layer layer_5BE1
+notedv PITCH_BF3, 0x20, 45
+notedv PITCH_A3, 0x30, 45
+end
+
+.channel system_menu_scroll_right
+instr FONT00_INSTR_DING
+env envelope_664C
+releaserate 245
+ldlayer 0, layer_5BF6
+ldlayer 1, layer_5BE1
+end
+
+.layer layer_5BF6
+notepan 104
+rjump layer_5BCE
+
+.channel system_ocarina_system_error
+instr FONT00_INSTR_FAIL_BELLS
+env envelope_65E8
+ldlayer 0, layer_5C03
+end
+
+.layer layer_5C03
+notedv PITCH_G4, 0x43, 110
+end
+
+.channel system_camera_mode_toggle_old
+ldlayer 0, layer_5C0B
+end
+
+.layer layer_5C0B
+instr FONT00_INSTR_DING
+releaserate 250
+notedv PITCH_A3, 0x6, 90
+env envelope_6674, 245
+portamento 0x81, 36, 144
+notedv PITCH_A4, 0x18, 90
+end
+
+.channel system_minimap_toggle_old
+ldlayer 0, layer_5C22
+end
+
+.layer layer_5C22
+instr FONT00_INSTR_DING
+releaserate 250
+notedv PITCH_A4, 0x6, 90
+env envelope_6674, 245
+portamento 0x82, 36, 144
+notedv PITCH_E4, 0x18, 60
+end
+
+.channel system_lens_on
+instr FONT00_INSTR_EYE_OF_TRUTH
+env envelope_65D8
+ldlayer 0, layer_5C3E
+end
+
+.layer layer_5C3E
+legato
+notedv PITCH_C4, 0x18, 100
+notedv PITCH_D4, 0x60, 100
+end
+
+.channel system_lens_off
+instr FONT00_INSTR_EYE_OF_TRUTH
+env envelope_65D8
+ldlayer 0, layer_5C4F
+end
+
+.layer layer_5C4F
+legato
+notedv PITCH_C4, 0x18, 100
+notedv PITCH_BF3, 0x60, 100
+end
+
+.channel system_gerudo_whistle
+instr FONT00_INSTR_WHISTLE
+ldlayer 0, layer_5C5D
+end
+
+.layer layer_5C5D
+notedv PITCH_EF4, 0x6, 100
+notedv PITCH_F4, 0x60, 100
+end
+
+.channel system_minigame_bell
+instr FONT00_INSTR_FAIL_BELLS
+ldlayer 0, layer_5C6A
+end
+
+.layer layer_5C6A
+transpose 48
+loop 4
+releaserate 250
+notedv PITCH_C4, 0xC, 98
+releaserate 216
+notedv PITCH_C4, 0x28, 87
+loopend
+end
+
+.channel system_message_done
+instr FONT00_INSTR_DING
+ldlayer 0, layer_5C80
+end
+
+.layer layer_5C80
+notedv PITCH_E4, 0x6, 70
+notedv PITCH_D4, 0x6, 70
+notedv PITCH_C4, 0xC, 70
+notepan 44
+notedv PITCH_C4, 0x6, 36
+notepan 84
+notedv PITCH_C4, 0xC, 36
+end
+
+.channel system_rupee_increase
+ldlayer 0, layer_5C9B
+ldlayer 1, layer_5CA1
+end
+
+.layer layer_5C9B
+instr FONT00_INSTR_RUPEE
+notedv PITCH_G5, 0xE, 66
+end
+
+.layer layer_5CA1
+transpose 24
+instr FONTANY_INSTR_SAWTOOTH
+env envelope_6660, 250
+notedv PITCH_F4, 0x3, 52
+end
+
+.channel system_z_lock_enemy
+ldlayer 0, layer_5CB1
+end
+
+.layer layer_5CB1
+instr FONT00_INSTR_Z_TARGET
+transpose 48
+notedv PITCH_C4, 0x61, 100
+end
+
+.channel system_get_treasure_item
+instr FONTANY_INSTR_TRIANGLE
+env envelope_664C
+releaserate 240
+ldlayer 0, layer_5CC4
+end
+
+.layer layer_5CC4
+call layer_fn_5BB4
+notedv PITCH_BF4, 0xA, 75
+notedv PITCH_G4, 0xA, 75
+notedv PITCH_EF4, 0xA, 75
+jump layer_5BAA
+
+.channel system_long_whiteout
+reverb 25
+ldlayer 0, layer_5CEB
+ldlayer 1, layer_5CDC
+end
+
+.layer layer_5CDC
+ldelay 0x64
+instr FONT00_INSTR_WHISTLE_PERSON
+env envelope_67CC, 221
+transpose 24
+notedv PITCH_B5, 0x96, 100
+end
+
+.layer layer_5CEB
+instr FONT00_INSTR_SLIDE_HEAVY
+env envelope_67D8, 221
+transpose 12
+portamento 0x81, 2, 255
+notedv PITCH_B5, 0xFA, 85
+end
+
+.channel system_whiteout
+reverb 25
+ldlayer 0, layer_5D12
+ldlayer 1, layer_5D05
+end
+
+.layer layer_5D05
+instr FONT00_INSTR_WHISTLE_PERSON
+env envelope_67D8, 200
+transpose 24
+notedv PITCH_B5, 0xC8, 100
+end
+
+.layer layer_5D12
+instr FONT00_INSTR_SLIDE_HEAVY
+env envelope_67D8, 200
+transpose 12
+notedv PITCH_B5, 0xC8, 85
+end
+
+.channel system_warp_in
+reverb 25
+ldlayer 0, layer_5D28
+ldlayer 1, layer_5D34
+end
+
+.layer layer_5D28
+instr FONT00_INSTR_WARP
+env envelope_6638, 221
+transpose 24
+notedv PITCH_B5, 0x40, 95
+end
+
+.layer layer_5D34
+instr FONT00_INSTR_DISTORTION
+env envelope_66D0, 224
+transpose 12
+notedv PITCH_B5, 0x20, 65
+end
+
+.channel system_shotgun
+instr FONT00_INSTR_SLAM_GUNSHOT
+gain 25
+ldlayer 0, layer_5D4B
+ldlayer 1, layer_5D51
+end
+
+.layer layer_5D4B
+ldelay 0x2A
+env envelope_66A0, 251
+
+.layer layer_5D51
+transpose 48
+notedv PITCH_C4, 0x0, 115
+end
+
+.channel system_metronome
+ldlayer 0, layer_5D5B
+end
+
+.layer layer_5D5B
+instr FONTANY_INSTR_DRUM
+notedv FONT00_DRUM_TAMBO_H, 0x48, 70
+end
+
+.channel system_z_shift_threat
+instr FONT00_INSTR_Z_TARGET
+ldlayer 0, layer_5D67
+end
+
+.layer layer_5D67
+notedv PITCH_C4, 0x39, 110
+end
+
+.channel system_metronome2
+instr FONTANY_INSTR_DRUM
+ldlayer 0, layer_5D71
+end
+
+.layer layer_5D71
+notedv FONT00_DRUM_TAMBO, 0x48, 70
+rjump layer_5D71
+
+.channel system_file_cursor
+ldlayer 0, layer_5D84
+ldlayer 1, layer_5D7D
+end
+
+.layer layer_5D7D
+call layer_fn_5D95
+notedv PITCH_C3, 0x10, 100
+end
+
+.layer layer_5D84
+call layer_fn_5D8E
+notedv PITCH_C3, 0x8, 46
+notedv PITCH_C4, 0x1C, 36
+end
+
+.layer layer_fn_5D8E
+instr FONTANY_INSTR_SINE
+env envelope_664C, 251
+end
+
+.layer layer_fn_5D95
+instr FONT00_INSTR_WARP
+env envelope_667C, 232
+transpose 36
+end
+
+.channel system_file_select
+ldlayer 0, layer_5DA5
+ldlayer 1, layer_5DB1
+end
+
+.layer layer_5DA5
+instr FONT00_INSTR_WARP
+env envelope_6610, 232
+transpose 36
+notedv PITCH_E3, 0x1E, 95
+end
+
+.layer layer_5DB1
+call layer_fn_5D8E
+notedv PITCH_D4, 0x6, 50
+notedv PITCH_E4, 0x18, 50
+end
+
+.channel system_file_enter
+ldlayer 0, layer_5DC2
+ldlayer 1, layer_5DCE
+end
+
+.layer layer_5DC2
+transpose 36
+.layer layer_5DC4
+instr FONT00_INSTR_WARP
+env envelope_6610, 232
+notedv PITCH_A3, 0x60, 112
+end
+
+.layer layer_5DCE
+call layer_fn_5D8E
+notedv PITCH_D4, 0x6, 50
+notedv PITCH_G4, 0x6, 50
+notedv PITCH_A4, 0x18, 50
+end
+
+.channel system_file_cancel
+ldlayer 0, layer_5DE2
+ldlayer 1, layer_5DE6
+end
+
+.layer layer_5DE2
+transpose 24
+rjump layer_5DC4
+
+.layer layer_5DE6
+call layer_fn_5D8E
+notedv PITCH_A4, 0x6, 50
+notedv PITCH_E4, 0x6, 50
+notedv PITCH_A3, 0x18, 50
+end
+
+.channel system_file_error
+ldlayer 0, layer_5DF7
+end
+
+.layer layer_5DF7
+instr FONTANY_INSTR_SINE
+env envelope_6718, 240
+notedv PITCH_BF2, 0x9, 70
+notedv PITCH_A2, 0x9, 70
+notedv PITCH_BF2, 0x9, 70
+notedv PITCH_A2, 0x18, 70
+end
+
+.channel system_equip_fire
+ldlayer 0, layer_1438
+ldlayer 1, layer_B1D
+ldlayer 2, layer_A6E
+end
+
+.channel system_equip_ice
+ldlayer 0, layer_1438
+ldlayer 1, layer_B47
+ldlayer 2, layer_B41
+end
+
+.channel system_equip_light
+ldlayer 0, layer_1438
+ldlayer 1, layer_B6D
+ldlayer 2, layer_B67
+end
+
+.channel system_equip_magic_bow
+ldlayer 0, layer_5E2C
+end
+
+.layer layer_5E2C
+transpose 12
+jump layer_1438
+
+.channel system_metronome3
+ldlayer 0, layer_5E35
+end
+
+.layer layer_5E35
+instr FONTANY_INSTR_DRUM
+releaserate 150
+notedv FONT00_DRUM_TAMBO_H, 0x24, 70
+end
+
+.channel system_skulltula_token_appears
+instr FONT00_INSTR_DING
+env envelope_6660
+releaserate 250
+ldlayer 0, layer_5E51
+ldlayer 1, layer_5E4B
+end
+
+.layer layer_5E4B
+ldelay 0x5
+notepan 94
+rjump layer_5E53
+
+.layer layer_5E51
+notepan 34
+.layer layer_5E53
+transpose 12
+notedv PITCH_F4, 0xC, 85
+notedv PITCH_BF4, 0xC, 85
+notedv PITCH_EF5, 0xC, 85
+notedv PITCH_BF5, 0xC, 85
+notedv PITCH_F5, 0x18, 85
+notedv PITCH_F5, 0x18, 45
+notedv PITCH_F5, 0x18, 25
+end
+
+.channel system_silver_rupee
+ldlayer 0, layer_5E6F
+end
+
+.layer layer_5E6F
+instr FONTANY_INSTR_SINE
+env envelope_66D0, 248
+notedv PITCH_BF3, 0xC, 80
+notedv PITCH_F3, 0xC, 80
+notedv PITCH_D4, 0xC, 80
+notedv PITCH_EF4, 0xC, 80
+notedv PITCH_F4, 0x18, 80
+notedv PITCH_F4, 0x18, 40
+end
+
+.channel system_carrot_recovered
+ldlayer 0, layer_5E8C
+end
+
+.layer layer_5E8C
+instr FONTANY_INSTR_SINE
+env envelope_6720, 246
+portamento 0x83, 32, 127
+notedv PITCH_C4, 0x8, 80
+notedv PITCH_C5, 0xC, 80
+end
diff --git a/assets/sequences/sfxbanks/voice.seq.inc b/assets/sequences/sfxbanks/voice.seq.inc
new file mode 100644
index 00000000000..8fb43c47fbd
--- /dev/null
+++ b/assets/sequences/sfxbanks/voice.seq.inc
@@ -0,0 +1,1083 @@
+.table table_voice
+entry voice_link_adult_attack
+entry voice_link_adult_attack_long
+entry voice_link_adult_epona
+entry voice_link_adult_ledge_grab
+entry voice_link_adult_ledge_climb
+entry voice_link_adult_hurt
+entry voice_link_adult_frozen
+entry voice_link_adult_fall_short
+entry voice_link_adult_fall_long
+entry voice_link_adult_low_health
+entry voice_link_adult_drink_gasp
+entry voice_link_adult_death
+entry voice_link_adult_wallmaster
+entry voice_link_adult_grabbed
+entry voice_link_adult_sneeze
+entry voice_link_adult_sweat
+entry voice_link_adult_drink
+entry voice_link_adult_idle
+entry voice_link_adult_sword_swing_unused
+entry voice_link_child_shiver
+entry voice_link_adult_jump
+entry voice_link_adult_cast_spell1
+entry voice_link_adult_shock
+entry voice_link_adult_cast_spell2
+entry voice_link_adult_push_block
+entry voice_link_adult_hookshot_hang
+entry voice_link_adult_knockback
+entry voice_link_adult_unused
+entry voice_link_adult_cast_spell3
+entry voice_link_adult_fall_long
+entry voice_link_adult_knockback_unused
+entry voice_link_adult_attack
+entry voice_link_child_attack
+entry voice_link_child_attack_long
+entry voice_link_adult_epona
+entry voice_link_child_ledge_grab
+entry voice_link_child_ledge_climb
+entry voice_link_child_hurt
+entry voice_link_child_frozen
+entry voice_link_child_fall_short
+entry voice_link_child_fall_long
+entry voice_link_child_low_health
+entry voice_link_child_drink_gasp
+entry voice_link_child_death
+entry voice_link_child_wallmaster
+entry voice_link_child_grabbed
+entry voice_link_child_sneeze
+entry voice_link_child_sweat
+entry voice_link_child_drink
+entry voice_link_child_idle
+entry voice_link_child_sword_swing_unused
+entry voice_link_child_shiver
+entry voice_link_child_jump
+entry voice_link_child_cast_spell1
+entry voice_link_child_shock
+entry voice_link_child_cast_spell2
+entry voice_link_child_push_block
+entry voice_link_child_hookshot_hang
+entry voice_link_child_knockback
+entry voice_link_child_unused
+entry voice_link_child_cast_spell3
+entry voice_link_child_fall_long
+entry voice_link_child_cutscene_attacked
+entry voice_link_adult_attack
+entry voice_navi_unused
+entry voice_navi_unused
+entry voice_navi_unused
+entry voice_navi_target
+entry voice_navi_greeting
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_navi_target
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_other_npcs
+entry voice_other_npcs
+entry voice_other_npcs
+entry voice_other_npcs
+entry voice_other_npcs
+entry voice_other_npcs
+entry voice_npcs
+entry voice_npcs
+entry voice_npcs
+
+# Play a random voice clip, but not two equal in a row.
+.channel play_random_voice
+stseq 0, getrand+1
+stseq 0, random_voice_cmpmax_instr+1
+ldi 0
+stseq 0, layer_play_voice+1 # overwrite delay = 0
+call getrand
+subio 6
+rbeqz random_voice_same
+call getrand
+rjump random_voice_store_last
+.channel random_voice_same
+call getrand
+sub 255
+stio 6
+.channel random_voice_cmpmax_instr
+sub 0
+rbeqz random_voice_store_last
+ldio 6
+.channel random_voice_store_last
+# Store the last index for both channel 14 and 15
+stcio 14, 6
+stcio 15, 6
+.channel play_voice_readtone_instr
+ldseq addr_616D # read tone at index. source gets overwritten by caller
+stseq 64, layer_play_voice # overwrite "notedv tone"
+ldio 6
+.channel play_voice_readvelocity_instr
+ldseq addr_6171 # read velocity (~volume) at index. source gets overwritten by caller
+.channel play_voice_with_velocity
+stseq 0, layer_play_voice+2 # overwrite velocity
+ldlayer 0, layer_play_voice
+
+.channel voice_navi_unused
+end
+
+.layer layer_play_voice
+notedv PITCH_A0, 0x0, 127
+end
+
+.channel getrand
+rand 0
+end
+
+.channel play_dynamic_voice
+stio 6
+ldi 0
+stseq 0, layer_play_voice+1 # overwrite delay = 0
+ldio 6
+rjump play_voice_readtone_instr
+
+.channel play_single_voice
+ldi 0
+stseq 0, layer_play_voice+1 # overwrite delay = 0
+ptrtodyntbl
+ldi 0
+dyntblv # read tone from large[0]
+stseq 64, layer_play_voice # overwrite "notedv tone"
+ldi 1
+dyntblv # read velocity from large[1]
+rjump play_voice_with_velocity
+
+# Same as play_random_voice but only supports two voice clips.
+.channel play_alternating_voice
+stseq 0, layer_play_voice+1 # overwrite delay = argument
+ldio 6
+sub 255
+and 1
+stio 6
+rjump play_voice_readtone_instr
+
+.channel voice_link_adult_attack
+ldptr addr_616D
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6171
+stptrtoseq play_voice_readvelocity_instr+1
+ldi 4
+rjump play_random_voice
+
+.array addr_616D
+byte FONT00_EFFECT_LINK_ADULT_ATTACK_0
+byte FONT00_EFFECT_LINK_ADULT_ATTACK_1
+byte FONT00_EFFECT_LINK_ADULT_ATTACK_2
+byte FONT00_EFFECT_LINK_ADULT_ATTACK_3
+
+.array addr_6171
+byte 105
+byte 105
+byte 105
+byte 105
+
+.channel voice_link_adult_attack_long
+ldptr addr_6197
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6199
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+rjump play_dynamic_voice
+
+.channel chan_unused_6185
+subio 6
+rbeqz chan_618C
+rand 2
+rjump chan_6196
+.channel chan_618C
+rand 2
+sub 255
+stio 6
+sub 2
+rbeqz chan_6196
+ldio 6
+.channel chan_6196
+stio 6
+
+.array addr_6197
+byte FONT00_EFFECT_LINK_ADULT_MAJOR_0
+byte FONT00_EFFECT_LINK_ADULT_MAJOR_1
+
+.array addr_6199
+byte 110
+byte 110
+
+.channel voice_link_adult_epona
+ldptr addr_61BD
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_61BF
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+rjump play_dynamic_voice
+
+.channel chan_unused_61AB
+subio 6
+rbeqz chan_61B2
+rand 2
+rjump chan_61BC
+.channel chan_61B2
+rand 2
+sub 255
+stio 6
+sub 2
+rbeqz chan_61BC
+ldio 6
+.channel chan_61BC
+stio 6
+
+.array addr_61BD
+byte FONT00_EFFECT_LINK_ADULT_SPUR_0
+byte FONT00_EFFECT_LINK_ADULT_SPUR_1
+
+.array addr_61BF
+byte 105
+byte 105
+
+.channel voice_link_adult_ledge_grab
+ldptr addr_61D1
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_61D3
+stptrtoseq play_voice_readvelocity_instr+1
+ldi 0
+rjump play_alternating_voice
+
+.array addr_61D1
+byte FONT00_EFFECT_LINK_ADULT_LEDGE_0
+byte FONT00_EFFECT_LINK_ADULT_LEDGE_2
+
+.array addr_61D3
+byte 95
+byte 105
+
+.channel voice_link_adult_ledge_climb
+ldptr addr_61E6
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_61E8
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_61E6
+byte FONT00_EFFECT_LINK_ADULT_CLIMB
+byte FONT00_EFFECT_LINK_ADULT_LEDGE_1
+
+.array addr_61E8
+byte 72
+byte 80
+
+.channel voice_link_adult_hurt
+ldptr addr_61FB
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_61FE
+stptrtoseq play_voice_readvelocity_instr+1
+ldi 3
+jump play_random_voice
+
+.array addr_61FB
+byte FONT00_EFFECT_LINK_ADULT_HURT_0
+byte FONT00_EFFECT_LINK_ADULT_HURT_1
+byte FONT00_EFFECT_LINK_ADULT_HURT_2
+
+.array addr_61FE
+byte 117
+byte 117
+byte 117
+
+.channel voice_link_adult_frozen
+ldptr addr_6212
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6215
+stptrtoseq play_voice_readvelocity_instr+1
+ldi 3
+jump play_random_voice
+
+.array addr_6212
+byte FONT00_EFFECT_LINK_ADULT_HURT_3
+byte FONT00_EFFECT_LINK_ADULT_KNOCKBACK
+byte FONT00_EFFECT_LINK_ADULT_HURT_4
+
+.array addr_6215
+byte 113
+byte 113
+byte 113
+
+.channel voice_link_adult_fall_short
+ldptr addr_6229
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_622B
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_6229
+byte FONT00_EFFECT_LINK_ADULT_GASP_0
+byte FONT00_EFFECT_LINK_ADULT_GASP_1
+
+.array addr_622B
+byte 100
+byte 100
+
+.channel voice_link_adult_fall_long
+ldptr addr_623E
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6240
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_623E
+byte FONT00_EFFECT_LINK_ADULT_FALL_0
+byte FONT00_EFFECT_LINK_ADULT_FALL_1
+
+.array addr_6240
+byte 110
+byte 110
+
+.channel voice_link_adult_low_health
+ldptr addr_6253
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6255
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_6253
+byte FONT00_EFFECT_LINK_ADULT_PANT_0
+byte FONT00_EFFECT_LINK_ADULT_PANT_1
+
+.array addr_6255
+byte 90
+byte 90
+
+.channel voice_link_adult_drink_gasp
+ldlayer 0, layer_625B
+end
+
+.layer layer_625B
+notedv PITCH_F5, 0x0, 96
+end
+
+.channel voice_link_adult_death
+ldlayer 0, layer_6263
+end
+
+.layer layer_6263
+transpose 1
+notedv PITCH_BF1, 0x57, 100
+notedv PITCH_B1, 0x61, 100
+notedv PITCH_C2, 0x47, 100
+end
+
+.channel voice_link_adult_wallmaster
+ldptr addr_6280
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6282
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_6280
+byte FONT00_EFFECT_LINK_ADULT_FALL_0
+byte FONT00_EFFECT_LINK_ADULT_FALL_1
+
+.array addr_6282
+byte 105
+byte 105
+
+.channel voice_link_adult_grabbed
+jump voice_link_adult_hurt
+
+.channel voice_link_adult_sneeze
+ldlayer 0, layer_628B
+end
+
+.layer layer_628B
+transpose 1
+notedv PITCH_DF2, 0x7F, 100
+notedv PITCH_D2, 0x118, 100
+notedv PITCH_EF2, 0x13E, 100
+end
+
+.channel voice_link_adult_sweat
+ldlayer 0, layer_629D
+end
+
+.layer layer_629D
+transpose 1
+notedv PITCH_E2, 0x122, 100
+notedv PITCH_F2, 0xA3, 100
+notedv PITCH_GF2, 0x35, 100
+end
+
+.channel voice_link_adult_drink
+ldlayer 0, layer_62AF
+end
+
+.layer layer_62AF
+notedv PITCH_E5, 0x50, 80
+rjump layer_62AF
+
+.channel voice_link_adult_idle
+ldlayer 0, layer_62B8
+end
+
+.layer layer_62B8
+transpose 1
+notedv PITCH_G2, 0xB9, 100
+notedv PITCH_AF2, 0x86, 100
+notedv PITCH_A2, 0x74, 100
+end
+
+.channel voice_link_adult_sword_swing_unused
+ldptr addr_62CC
+jump play_single_voice
+
+.array addr_62CC
+byte FONT00_EFFECT_LINK_ADULT_ATTACK_0
+byte 100
+
+.channel voice_link_adult_jump
+ldio 6
+sub 255
+stio 6
+and 1
+ldseq addr_62E8
+stseq 64, layer_64BF
+rand 2
+ldseq addr_62EA
+stseq 0, layer_64BF+2
+ldlayer 0, layer_64BF
+end
+
+.array addr_62E8
+byte FONT00_EFFECT_LINK_ADULT_JUMP
+byte FONT00_EFFECT_LINK_ADULT_GASP_2
+
+.array addr_62EA
+byte 80
+byte 85
+
+.channel voice_link_adult_cast_spell1
+ldptr addr_62F2
+jump play_single_voice
+
+.array addr_62F2
+byte FONT00_EFFECT_LINK_ADULT_MAJOR_1
+byte 110
+
+.channel voice_link_adult_shock
+ldlayer 0, layer_62F8
+end
+
+.layer layer_62F8
+transpose 2
+notedv PITCH_EF1, 0x0, 85
+end
+
+.channel voice_link_adult_cast_spell2
+ldptr addr_6304
+jump play_single_voice
+
+.array addr_6304
+byte FONT00_EFFECT_LINK_ADULT_MAJOR_0
+byte 95
+
+.channel voice_link_adult_push_block
+ldptr addr_630C
+jump play_single_voice
+
+.array addr_630C
+byte FONT00_EFFECT_LINK_ADULT_CLIMB
+byte 82
+
+.channel voice_link_adult_hookshot_hang
+ldptr addr_6314
+jump play_single_voice
+
+.array addr_6314
+byte FONT00_EFFECT_LINK_ADULT_LEDGE_0
+byte 95
+
+.channel voice_link_adult_knockback
+ldptr addr_631C
+jump play_single_voice
+
+.array addr_631C
+byte FONT00_EFFECT_LINK_ADULT_FALL_DMG
+byte 110
+
+.channel voice_link_adult_unused
+ldptr addr_6324
+jump play_single_voice
+
+.array addr_6324
+byte FONT00_EFFECT_LINK_ADULT_LIFT
+byte 100
+
+.channel voice_link_adult_cast_spell3
+ldptr addr_632C
+jump play_single_voice
+
+.array addr_632C
+byte FONT00_EFFECT_LINK_ADULT_SPELL
+byte 110
+
+.channel voice_link_adult_knockback_unused
+ldptr addr_6334
+jump play_single_voice
+
+.array addr_6334
+byte FONT00_EFFECT_LINK_ADULT_KNOCKBACK
+byte 113
+
+.channel voice_link_child_attack
+ldptr addr_6347
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_634B
+stptrtoseq play_voice_readvelocity_instr+1
+ldi 4
+jump play_random_voice
+
+.array addr_6347
+byte FONT00_EFFECT_LINK_CHILD_ATTACK_0
+byte FONT00_EFFECT_LINK_CHILD_ATTACK_1
+byte FONT00_EFFECT_LINK_CHILD_ATTACK_2
+byte FONT00_EFFECT_LINK_CHILD_ATTACK_3
+
+.array addr_634B
+byte 110
+byte 110
+byte 110
+byte 110
+
+.channel voice_link_child_attack_long
+ldptr addr_6372
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6374
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.channel chan_unused_6360
+subio 6
+rbeqz chan_6367
+rand 2
+rjump chan_6371
+.channel chan_6367
+rand 2
+sub 255
+stio 6
+sub 2
+rbeqz chan_6371
+ldio 6
+.channel chan_6371
+stio 6
+
+.array addr_6372
+byte FONT00_EFFECT_LINK_CHILD_STRONG_0
+byte FONT00_EFFECT_LINK_CHILD_STRONG_1
+
+.array addr_6374
+byte 110
+byte 110
+
+.channel voice_link_child_ledge_grab
+ldio 6
+sub 255
+stio 6
+and 1
+ldseq addr_6396
+stseq 64, layer_6390
+rand 2
+ldseq addr_6398
+stseq 0, layer_6390+2
+ldlayer 0, layer_6390
+end
+
+.layer layer_6390
+notedv PITCH_A0, 0x0, 100
+ldelay 0x30
+end
+
+.array addr_6396
+byte FONT00_EFFECT_LINK_CHILD_LEDGE_0
+byte FONT00_EFFECT_LINK_CHILD_LEDGE_1
+
+.array addr_6398
+byte 100
+byte 100
+
+.channel voice_link_child_ledge_climb
+ldptr addr_63AB
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_63AD
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_63AB
+byte FONT00_EFFECT_LINK_CHILD_SIGH_0
+byte FONT00_EFFECT_LINK_CHILD_SIGH_1
+
+.array addr_63AD
+byte 90
+byte 70
+
+.channel voice_link_child_hurt
+ldptr addr_63C0
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_63C3
+stptrtoseq play_voice_readvelocity_instr+1
+ldi 3
+jump play_random_voice
+
+.array addr_63C0
+byte FONT00_EFFECT_LINK_CHILD_HURT_0
+byte FONT00_EFFECT_LINK_CHILD_HURT_1
+byte FONT00_EFFECT_LINK_CHILD_HURT_2
+
+.array addr_63C3
+byte 110
+byte 110
+byte 110
+
+.channel voice_link_child_frozen
+ldptr addr_63D7
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_63DA
+stptrtoseq play_voice_readvelocity_instr+1
+ldi 3
+jump play_random_voice
+
+.array addr_63D7
+byte FONT00_EFFECT_LINK_CHILD_HURT_3
+byte FONT00_EFFECT_LINK_CHILD_KNOCKBACK
+byte FONT00_EFFECT_LINK_CHILD_HURT_4
+
+.array addr_63DA
+byte 110
+byte 110
+byte 110
+
+.channel voice_link_child_fall_short
+ldptr addr_63EE
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_63F0
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_63EE
+byte FONT00_EFFECT_LINK_CHILD_GASP_0
+byte FONT00_EFFECT_LINK_CHILD_GASP_1
+
+.array addr_63F0
+byte 100
+byte 100
+
+.channel voice_link_child_fall_long
+ldptr addr_6403
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6405
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_6403
+byte FONT00_EFFECT_LINK_CHILD_FALL_0
+byte FONT00_EFFECT_LINK_CHILD_FALL_1
+
+.array addr_6405
+byte 100
+byte 100
+
+.channel voice_link_child_low_health
+ldptr addr_6418
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_641A
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_6418
+byte FONT00_EFFECT_LINK_CHILD_WHEEZE
+byte FONT00_EFFECT_LINK_CHILD_PANT
+
+.array addr_641A
+byte 85
+byte 85
+
+.channel voice_link_child_drink_gasp
+ldlayer 0, layer_6420
+end
+
+.layer layer_6420
+notedv PITCH_DF5, 0x0, 96
+end
+
+.channel voice_link_child_death
+ldlayer 0, layer_6428
+end
+
+.layer layer_6428
+transpose 1
+notedv PITCH_A0, 0x62, 100
+notedv PITCH_BF0, 0x6A, 100
+notedv PITCH_B0, 0x3A, 100
+end
+
+.channel voice_link_child_wallmaster
+ldptr addr_6445
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_6447
+stptrtoseq play_voice_readvelocity_instr+1
+rand 2
+jump play_dynamic_voice
+
+.array addr_6445
+byte FONT00_EFFECT_LINK_CHILD_FALL_0
+byte FONT00_EFFECT_LINK_CHILD_FALL_1
+
+.array addr_6447
+byte 100
+byte 100
+
+.channel voice_link_child_grabbed
+ldptr addr_644F
+jump play_single_voice
+
+.array addr_644F
+byte FONT00_EFFECT_LINK_CHILD_DEATH_0
+byte 100
+
+.channel voice_link_child_sneeze
+ldlayer 0, layer_6455
+end
+
+.layer layer_6455
+transpose 1
+notedv PITCH_C1, 0x10B, 50
+notedv PITCH_C1, 0xC5, 50
+notedv PITCH_D1, 0x87, 100
+notedv PITCH_EF1, 0x21, 100
+end
+
+.channel voice_link_child_sweat
+ldlayer 0, layer_646B
+end
+
+.layer layer_646B
+transpose 1
+notedv PITCH_E1, 0xD9, 100
+notedv PITCH_F1, 0x62, 100
+notedv PITCH_GF1, 0x109, 100
+end
+
+.channel voice_link_child_drink
+ldlayer 0, layer_647D
+end
+
+.layer layer_647D
+notedv PITCH_C5, 0x50, 80
+rjump layer_647D
+
+.channel voice_link_child_idle
+ldlayer 0, layer_6486
+end
+
+.layer layer_6486
+transpose 1
+notedv PITCH_G1, 0x41, 100
+notedv PITCH_AF1, 0x10A, 100
+notedv PITCH_A1, 0x53, 100
+end
+
+.channel voice_link_child_sword_swing_unused
+ldptr addr_6499
+jump play_single_voice
+
+.array addr_6499
+byte FONT00_EFFECT_LINK_CHILD_ATTACK_0
+byte 100
+
+.channel voice_link_child_shiver
+ldlayer 0, layer_649F
+end
+
+.layer layer_649F
+transpose 1
+notedv PITCH_C1, 0x0, 50
+end
+
+.channel voice_link_child_jump
+ldio 6
+sub 255
+stio 6
+and 1
+ldseq addr_64C5
+stseq 64, layer_64BF
+rand 2
+ldseq addr_64C7
+stseq 0, layer_64BF+2
+ldlayer 0, layer_64BF
+end
+
+.layer layer_64BF
+notedv PITCH_A0, 0x0, 100
+ldelay 0x30
+end
+
+.array addr_64C5
+byte FONT00_EFFECT_LINK_CHILD_JUMP_0
+byte FONT00_EFFECT_LINK_ADULT_JUMP_1
+
+.array addr_64C7
+byte 80
+byte 80
+
+.channel voice_link_child_cast_spell1
+ldptr addr_64CF
+jump play_single_voice
+
+.array addr_64CF
+byte FONT00_EFFECT_LINK_CHILD_STRONG_1
+byte 110
+
+.channel voice_link_child_shock
+ldlayer 0, layer_64D5
+end
+
+.layer layer_64D5
+transpose 2
+notedv PITCH_E1, 0x0, 85
+end
+
+.channel voice_link_child_cast_spell2
+ldptr addr_64E1
+jump play_single_voice
+
+.array addr_64E1
+byte FONT00_EFFECT_LINK_CHILD_STRONG_0
+byte 95
+
+.channel voice_link_child_push_block
+ldptr addr_64E9
+jump play_single_voice
+
+.array addr_64E9
+byte FONT00_EFFECT_LINK_CHILD_SIGH_0
+byte 90
+
+.channel voice_link_child_hookshot_hang
+ldptr addr_64F1
+jump play_single_voice
+
+.array addr_64F1
+byte FONT00_EFFECT_LINK_CHILD_LEDGE_0
+byte 100
+
+.channel voice_link_child_knockback
+ldptr addr_64F9
+jump play_single_voice
+
+.array addr_64F9
+byte FONT00_EFFECT_LINK_CHILD_FALL_DMG
+byte 115
+
+.channel voice_link_child_unused
+ldptr addr_6501
+jump play_single_voice
+
+.array addr_6501
+byte FONT00_EFFECT_LINK_CHILD_CHARGE
+byte 100
+
+.channel voice_link_child_cast_spell3
+ldptr addr_6509
+jump play_single_voice
+
+.array addr_6509
+byte FONT00_EFFECT_LINK_CHILD_SPELL
+byte 110
+
+.channel voice_link_child_cutscene_attacked
+ldptr addr_6511
+jump play_single_voice
+
+.array addr_6511
+byte FONT00_EFFECT_LINK_CHILD_FALL_1
+byte 100
+
+.channel voice_navi_greeting
+ldi 32
+stio 1
+ldlayer 0, layer_651A
+end
+
+.layer layer_651A
+transpose 2
+notedv PITCH_DF1, 0x0, 100
+end
+
+.channel voice_npcs
+ldio 4
+sub 80
+stseq 25, layer_6536 # set semitone = sound id - 80 + 25
+ldseq addr_653B
+stseq 0, layer_6536+2
+ldlayer 0, layer_6534
+panweight 96
+end
+
+.layer layer_6534
+transpose 1
+.layer layer_6536
+notedvg 33, 0x0, 100, 0
+end
+
+.array addr_653B
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 110
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 110
+
+.channel voice_other_npcs
+ldio 4
+sub 119
+stseq 0, layer_6576 # set semitone = sound id - 119
+ldseq addr_657B
+stseq 0, layer_6576+2
+ldlayer 0, layer_6574
+end
+
+.layer layer_6574
+transpose 2
+.layer layer_6576
+notedvg 0, 0x0, 100, 0
+end
+
+.array addr_657B
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+byte 100
+
+.channel voice_navi_target
+ldi 32
+stio 1
+ldlayer 1, layer_6598
+ldptr addr_65A7
+stptrtoseq play_voice_readtone_instr+1
+ldptr addr_65AA
+stptrtoseq play_voice_readvelocity_instr+1
+ldi 3
+jump play_random_voice
+
+.layer layer_6598
+instr FONT00_INSTR_FAIRY_MAGIC
+env envelope_66B8, 251
+legato
+portamento 0x81, 51, 255
+notedv PITCH_F5, 0x30, 65
+end
+
+.array addr_65A7
+byte FONT00_EFFECT_NAVI_WATCH_OUT
+byte FONT00_EFFECT_NAVI_LOOK
+byte FONT00_EFFECT_NAVI_HEY
+
+.array addr_65AA
+byte 100
+byte 95
+byte 105
+
+.filter filter_voice0
+filter 0, 0, 0, 0, 0, 0, 0, 0
+
+.filter filter_voice1
+filter 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/assets/xml/samples/0 Sound Effects.xml b/assets/xml/samples/0 Sound Effects.xml
new file mode 100644
index 00000000000..da1f12fad5f
--- /dev/null
+++ b/assets/xml/samples/0 Sound Effects.xml
@@ -0,0 +1,1052 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/samples/1 Orchestra.xml b/assets/xml/samples/1 Orchestra.xml
new file mode 100644
index 00000000000..35d5b06b4c3
--- /dev/null
+++ b/assets/xml/samples/1 Orchestra.xml
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/samples/2 Inside the Deku Tree.xml b/assets/xml/samples/2 Inside the Deku Tree.xml
new file mode 100644
index 00000000000..dff8698a62d
--- /dev/null
+++ b/assets/xml/samples/2 Inside the Deku Tree.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/assets/xml/samples/3 Inside Jabu Jabu.xml b/assets/xml/samples/3 Inside Jabu Jabu.xml
new file mode 100644
index 00000000000..93b5a4887dc
--- /dev/null
+++ b/assets/xml/samples/3 Inside Jabu Jabu.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/samples/4 Forest Temple (Unused).xml b/assets/xml/samples/4 Forest Temple (Unused).xml
new file mode 100644
index 00000000000..8e63650d4de
--- /dev/null
+++ b/assets/xml/samples/4 Forest Temple (Unused).xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/samples/5 Goron City.xml b/assets/xml/samples/5 Goron City.xml
new file mode 100644
index 00000000000..b65db087df2
--- /dev/null
+++ b/assets/xml/samples/5 Goron City.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/samples/6 Spirit Temple.xml b/assets/xml/samples/6 Spirit Temple.xml
new file mode 100644
index 00000000000..b1cfcdc57fb
--- /dev/null
+++ b/assets/xml/samples/6 Spirit Temple.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/sequences/Sequences.xml b/assets/xml/sequences/Sequences.xml
new file mode 100644
index 00000000000..fea36e05bb4
--- /dev/null
+++ b/assets/xml/sequences/Sequences.xml
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Ambience.xml b/assets/xml/soundfonts/Ambience.xml
new file mode 100644
index 00000000000..c92d4fd498d
--- /dev/null
+++ b/assets/xml/soundfonts/Ambience.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Deku Tree (Unused).xml b/assets/xml/soundfonts/Deku Tree (Unused).xml
new file mode 100644
index 00000000000..3a5c98f9b17
--- /dev/null
+++ b/assets/xml/soundfonts/Deku Tree (Unused).xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Deku Tree.xml b/assets/xml/soundfonts/Deku Tree.xml
new file mode 100644
index 00000000000..39673426379
--- /dev/null
+++ b/assets/xml/soundfonts/Deku Tree.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Dodongo's Cavern.xml b/assets/xml/soundfonts/Dodongo's Cavern.xml
new file mode 100644
index 00000000000..2c5b4690cf6
--- /dev/null
+++ b/assets/xml/soundfonts/Dodongo's Cavern.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Ending 1.xml b/assets/xml/soundfonts/Ending 1.xml
new file mode 100644
index 00000000000..4f73309fbe9
--- /dev/null
+++ b/assets/xml/soundfonts/Ending 1.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Ending 2.xml b/assets/xml/soundfonts/Ending 2.xml
new file mode 100644
index 00000000000..151d774281b
--- /dev/null
+++ b/assets/xml/soundfonts/Ending 2.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Fairy Fountain.xml b/assets/xml/soundfonts/Fairy Fountain.xml
new file mode 100644
index 00000000000..0c2230836ea
--- /dev/null
+++ b/assets/xml/soundfonts/Fairy Fountain.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Fire Temple.xml b/assets/xml/soundfonts/Fire Temple.xml
new file mode 100644
index 00000000000..0f354284a32
--- /dev/null
+++ b/assets/xml/soundfonts/Fire Temple.xml
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Forest Temple.xml b/assets/xml/soundfonts/Forest Temple.xml
new file mode 100644
index 00000000000..394ed2dde5c
--- /dev/null
+++ b/assets/xml/soundfonts/Forest Temple.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Game Over.xml b/assets/xml/soundfonts/Game Over.xml
new file mode 100644
index 00000000000..054e4ce7528
--- /dev/null
+++ b/assets/xml/soundfonts/Game Over.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Ganon's Castle (Organ).xml b/assets/xml/soundfonts/Ganon's Castle (Organ).xml
new file mode 100644
index 00000000000..630ef6487d0
--- /dev/null
+++ b/assets/xml/soundfonts/Ganon's Castle (Organ).xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Ganon's Castle.xml b/assets/xml/soundfonts/Ganon's Castle.xml
new file mode 100644
index 00000000000..61879dddb60
--- /dev/null
+++ b/assets/xml/soundfonts/Ganon's Castle.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Ganondorf's Battle.xml b/assets/xml/soundfonts/Ganondorf's Battle.xml
new file mode 100644
index 00000000000..af0ab3e80cf
--- /dev/null
+++ b/assets/xml/soundfonts/Ganondorf's Battle.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Gerudo Valley.xml b/assets/xml/soundfonts/Gerudo Valley.xml
new file mode 100644
index 00000000000..116d4615a6a
--- /dev/null
+++ b/assets/xml/soundfonts/Gerudo Valley.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Goron City.xml b/assets/xml/soundfonts/Goron City.xml
new file mode 100644
index 00000000000..a61aba5f0b3
--- /dev/null
+++ b/assets/xml/soundfonts/Goron City.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Horse Race.xml b/assets/xml/soundfonts/Horse Race.xml
new file mode 100644
index 00000000000..8f88e0300f2
--- /dev/null
+++ b/assets/xml/soundfonts/Horse Race.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Ice Cavern.xml b/assets/xml/soundfonts/Ice Cavern.xml
new file mode 100644
index 00000000000..7086c29aa10
--- /dev/null
+++ b/assets/xml/soundfonts/Ice Cavern.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Jabu Jabu.xml b/assets/xml/soundfonts/Jabu Jabu.xml
new file mode 100644
index 00000000000..cb7cc01d499
--- /dev/null
+++ b/assets/xml/soundfonts/Jabu Jabu.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Kaepora Gaebora's Theme.xml b/assets/xml/soundfonts/Kaepora Gaebora's Theme.xml
new file mode 100644
index 00000000000..6aac7c12db4
--- /dev/null
+++ b/assets/xml/soundfonts/Kaepora Gaebora's Theme.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Kakariko Village (Child).xml b/assets/xml/soundfonts/Kakariko Village (Child).xml
new file mode 100644
index 00000000000..59287ff47b1
--- /dev/null
+++ b/assets/xml/soundfonts/Kakariko Village (Child).xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Kokiri Forest.xml b/assets/xml/soundfonts/Kokiri Forest.xml
new file mode 100644
index 00000000000..9771aa82714
--- /dev/null
+++ b/assets/xml/soundfonts/Kokiri Forest.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Kotake and Koume's Theme.xml b/assets/xml/soundfonts/Kotake and Koume's Theme.xml
new file mode 100644
index 00000000000..ab55d52f35f
--- /dev/null
+++ b/assets/xml/soundfonts/Kotake and Koume's Theme.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Laboratory.xml b/assets/xml/soundfonts/Laboratory.xml
new file mode 100644
index 00000000000..cbc9e92452b
--- /dev/null
+++ b/assets/xml/soundfonts/Laboratory.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Legends of Hyrule.xml b/assets/xml/soundfonts/Legends of Hyrule.xml
new file mode 100644
index 00000000000..dab070599fd
--- /dev/null
+++ b/assets/xml/soundfonts/Legends of Hyrule.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Lon Lon Ranch.xml b/assets/xml/soundfonts/Lon Lon Ranch.xml
new file mode 100644
index 00000000000..fe7c2402b45
--- /dev/null
+++ b/assets/xml/soundfonts/Lon Lon Ranch.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Market.xml b/assets/xml/soundfonts/Market.xml
new file mode 100644
index 00000000000..646f1f27a2d
--- /dev/null
+++ b/assets/xml/soundfonts/Market.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Minigames.xml b/assets/xml/soundfonts/Minigames.xml
new file mode 100644
index 00000000000..5da6a3e973f
--- /dev/null
+++ b/assets/xml/soundfonts/Minigames.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Orchestra.xml b/assets/xml/soundfonts/Orchestra.xml
new file mode 100644
index 00000000000..e42d99921f7
--- /dev/null
+++ b/assets/xml/soundfonts/Orchestra.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Shadow Temple.xml b/assets/xml/soundfonts/Shadow Temple.xml
new file mode 100644
index 00000000000..83d661fde19
--- /dev/null
+++ b/assets/xml/soundfonts/Shadow Temple.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Shops.xml b/assets/xml/soundfonts/Shops.xml
new file mode 100644
index 00000000000..466503a5a06
--- /dev/null
+++ b/assets/xml/soundfonts/Shops.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Sound Effects 1.xml b/assets/xml/soundfonts/Sound Effects 1.xml
new file mode 100644
index 00000000000..d84e45064cc
--- /dev/null
+++ b/assets/xml/soundfonts/Sound Effects 1.xml
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/assets/xml/soundfonts/Sound Effects 2.xml b/assets/xml/soundfonts/Sound Effects 2.xml
new file mode 100644
index 00000000000..4aa2e6199fa
--- /dev/null
+++ b/assets/xml/soundfonts/Sound Effects 2.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/assets/xml/soundfonts/Spirit Temple.xml b/assets/xml/soundfonts/Spirit Temple.xml
new file mode 100644
index 00000000000..f9fbc4ef3a4
--- /dev/null
+++ b/assets/xml/soundfonts/Spirit Temple.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Title Theme.xml b/assets/xml/soundfonts/Title Theme.xml
new file mode 100644
index 00000000000..cfce230830e
--- /dev/null
+++ b/assets/xml/soundfonts/Title Theme.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Unused.xml b/assets/xml/soundfonts/Unused.xml
new file mode 100644
index 00000000000..d58e1aa05b2
--- /dev/null
+++ b/assets/xml/soundfonts/Unused.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Warp Songs.xml b/assets/xml/soundfonts/Warp Songs.xml
new file mode 100644
index 00000000000..e2dda90b624
--- /dev/null
+++ b/assets/xml/soundfonts/Warp Songs.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Water Temple.xml b/assets/xml/soundfonts/Water Temple.xml
new file mode 100644
index 00000000000..61879ed2364
--- /dev/null
+++ b/assets/xml/soundfonts/Water Temple.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/soundfonts/Zora's Domain.xml b/assets/xml/soundfonts/Zora's Domain.xml
new file mode 100644
index 00000000000..09f736e9c72
--- /dev/null
+++ b/assets/xml/soundfonts/Zora's Domain.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/audio_pad.rodata.s b/data/audio_pad.rodata.s
new file mode 100644
index 00000000000..2ea0c2f4ca5
--- /dev/null
+++ b/data/audio_pad.rodata.s
@@ -0,0 +1,11 @@
+.include "macro.inc"
+
+# assembler directives
+.set noat # allow manual use of $at
+.set noreorder # don't insert nops after branches
+.set gp=64 # allow use of 64-bit general purpose registers
+
+.section .rodata
+
+.balign 16
+.fill 0x20
diff --git a/data/audio_tables.rodata.s b/data/audio_tables.rodata.s
deleted file mode 100644
index fb31af24b22..00000000000
--- a/data/audio_tables.rodata.s
+++ /dev/null
@@ -1,22 +0,0 @@
-.include "macro.inc"
-
-# assembler directives
-.set noat # allow manual use of $at
-.set noreorder # don't insert nops after branches
-.set gp=64 # allow use of 64-bit general purpose registers
-
-.section .rodata
-
-.balign 16
-
-glabel gSoundFontTable
- .incbin "baserom.z64", 0xBCC270, 0x270
-
-glabel gSequenceFontTable
- .incbin "baserom.z64", 0xBCC4E0, 0x1C0
-
-glabel gSequenceTable
- .incbin "baserom.z64", 0xBCC6A0, 0x6F0
-
-glabel gSampleBankTable
- .incbin "baserom.z64", 0xBCCD90, 0x80
diff --git a/docs/Music Macro Language.md b/docs/Music Macro Language.md
new file mode 100644
index 00000000000..44946b2ceab
--- /dev/null
+++ b/docs/Music Macro Language.md
@@ -0,0 +1,989 @@
+# Music Macro Language
+
+Ocarina of Time contains a number of files known as **sequences**. These sequences typically represent the music that plays during regular gameplay, such as Hyrule Field's theme or the Fire Temple background music. These sequences are comparable to General MIDI version 1 with some noticeable differences, but the language that composes these sequences is much more complex and can support more programmatic uses. Ocarina of Time in particular uses this language in innovative ways, which are described later in this document.
+
+Note that if you have not read the documentation describing how the audio subsystem works in Ocarina of Time, it's *strongly* recommended that you read that document first, as it provides a high-level description of how the audio library works and its different components. It will be assumed that you are familiar with the terms and concepts introduced in that document here.
+
+The macro language is very similar conceptually to an assembly language or tracker file, with the ability to loop, change parameters and configuration settings, switch between soundfonts, interact with the game engine to allow for dynamic changes, and randomization.
+
+## Structure of a Sequence
+
+Generally, a sequence is composed in three major sections: descriptor, track, and data. Each of these sections is different from the other, and in some cases they may be interleaved with each other. For example, if a sequence has multiple subsequences embedded inside it, those subsequences may contain their own data sections.
+
+### Primitives and Labels
+
+Sequences may contain primitives, such as text and integers, which can be used as parameters for instructions or entries.
+
+**Strings**: A series of Unicode characters enclosed by quotation marks. For example: `"this is a string"`.
+
+**Integers**: Numerical values without a fractional component. For most usages, the integer must be within a certain supported range (as documented). An integer can be written in decimal, hexadecimal, or binary, whichever feels most appropriate. For example: `123`, `0x7B`, or `0b01111011`.
+
+**Labels** allow you to provide a label for a certain subsection of the track code or data values. They are defined using a related metacommand (documented in the next section), which specifies the label type. Labels may consist of a series of Unicode letters or numbers, as well as underscores and periods. You may then reference that label in your track code or data where the label type is accepted (as documented). You can also use relative offsets around a label if you want to adjust where you're pointing to relative to the location of the label.
+
+All label names must be unique. If you define the same label in multiple locations of the sequence, this will result in an error. Note that this applies across label types; for example, a channel label called `percussion` prevents a note layer label from being called `percussion`.
+
+For example, this illustrates the usage of labels to reference a channel label:
+```
+ldchan 1, chan1_script
+end
+
+.channel chan1_script
+... various channel instructions ...
+```
+
+The following illustrates the usage of label offsets to allow rewriting a parameter to a command:
+```
+stseq 5, notecmd+1 # Changes the pitch played by the notedvg command
+...
+.layer notecmd
+notedvg 0, 10, 127 # The first parameter here will be changed to 5
+```
+
+### Comments and Metainstructions
+
+Comments allow you to provide information that may be valuable to those who read the sequence contents directly. These can provide documentation or explain more complex logic used in the sequence and are particularly useful for more complex, programmatic sequences.
+
+A comment always starts with a # character. This may appear anywhere in a line, and all text after the # will be ignored by editors or parsers. These comments will not be saved or stored in the binary representation of a sequence. They are purely for documentation purposes only.
+
+Metainstructions are instructions that are read by the editor or parser, but do not get stored in the resultant binary file directly. The following metainstructions are supported by the parser provided by `assemble_sequence`. Other tools may support additional metainstructions, but these are always supported by all tools.
+
+**.define** *symbol* *value*
+
+**Description:** Defines a symbol that may be used elsewhere in the sequence script. The symbol may consist of any Unicode letter, number, or underscores. The value must be a primitive value. Symbols must be defined only once in a sequence, similar to
+
+**Parameters:**
+
+* `symbol` - The symbol being defined in the sequence.
+* `value` - A primitive that will the symbol represents.
+
+**Example:**
+```
+.define IO_PORT_FXID 0 # Defines a symbol called IO_PORT_FXID with a value of 0.
+
+ldio IO_PORT_IO # Loads a value from IO port 0.
+```
+
+**.include** *filename*
+
+**Description:** Defines a sequence file to be included into this sequence. When processing, this will embed the contents of that file precisely where it's included with the `.include` directive. The filename provided must be a path relative to this sequence file and enclosed with double quotes. Note that care must be taken not to include the same file multiple times, or to have two or more files include each other in a way that would result in an infinite loop.
+
+Symbols and labels exist in a global scope across all included files. This means that any symbol or label defined in one file may be used in any other file, even if the file referencing that label does not include the file defining the label directly. So long as the label is included somewhere, it can be referenced.
+
+**Parameters:**
+* `filename` - The relative path to the sequence file to include at this point in the sequence.
+
+**Example:**
+
+The following example consists of three different files: `example.mus`, the main sequence; `constants.inc`, a file containing constants used across the sequence files; and `alternate.mus.inc`, containing an alternate section that plays when the game prompts it to do so.
+
+**example.mus**
+```
+.desc title Example Sequence
+.desc author zeldaret
+.usefont SOUNDFONT_ORCHESTRA
+.include "constants.inc" # This is the same as though constants.inc was written directly here.
+
+.sequence start
+mutebhv 0x20
+mutescale 50
+initchan 0b0000000000000001 # Only channel 0 is used.
+ldchan 0, channel0_main # Play the main tune first.
+vol 70
+tempo 64
+delay 150
+.sequence main_loop_start
+ldio IO_PORT_MAIN # Reads from the IO port. If false, uses the alternate melody, otherwise it uses the main melody.
+beqz use_alternate_melody
+ldchan 0, channel0_main
+delay 150
+jump main_loop_start
+.sequence use_alternate_melody
+ldi TRUE # Prevents the alternate melody from being played again until the game signals it.
+stio IO_PORT_ALT
+ldchan 0, channel0_alt
+delay 150
+jump main_loop_start
+end
+
+.channel channel0_main
+... various instructions here ...
+end
+
+.include "alternate.mus.inc" # This is the same as though alternate.mus.inc was written directly here.
+```
+
+**constants.inc**
+```
+# IO port 0: Signals to the sequence to play an alternate melody instead of the main melody.
+.define IO_PORT_MAIN 0
+
+# Binary values
+.define TRUE 1
+.define FALSE 0
+```
+
+**alternate.mus.inc**
+```
+.desc title Alternate Melody
+
+.channel channel0_alt
+... various instructions here...
+end
+```
+
+**Label Metainstructions**
+
+The following metainstructions allow you to define a label that points to the relevant set of instructions. These metainstructions are the following:
+
+| Metacommand | Description |
+| ----------- | ----------------------------------------------------------- |
+| .sequence | A series of sequence instructions within a track section. |
+| .channel | A series of channel instructions within a track section. |
+| .layer | A series of note layer instructions within a track section. |
+| .table | A table of entries or bytes within a data section. |
+| .array | An array of bytes or shorts in a data section. |
+| .filter | References a filter structure in a data section. |
+| .envelope | References an envelope structure in a data section. |
+| .buffer | References a buffer within a data section. |
+
+**Section Metainstructions**
+
+There are metainstructions specific to certain sections that will be documented in those sections specifically. These will be described in those sections as appropriate. Note that metainstructions are always distinguished by starting with a period, whereas instructions do not.
+
+### Descriptor Section
+
+The descriptor section is composed of instructions that provide information useful for describing the sequence. The only required command for this section is .usefont, which may only be used at the very beginning of the track and defines what soundfonts will be available for use by the sequence.
+
+#### Metainstructions
+
+*Descriptor instructions have no binary representation.*
+
+**.desc** *type* *text*
+
+**Description:** A descriptor to provide information to users and editors. Type can be any single word, but the most commonly used are *title* and *author*.
+
+**Example:**
+```
+.desc title "An Example Sequence"
+.desc author "zeldaret"
+```
+
+**.usefont** *index*
+
+**Description:** Specifies a soundfont that should be available for the sequence to use. The first soundfont specified will be active by default when loaded by the game. Note that the game never uses more than two soundfonts for a sequence, but more than two are theoretically supported.
+
+**Example:**
+```
+.usefont 1 # Can also use SOUNDFONT_SFX_1
+.usefont 3 # See sequence.inc for other soundfont constants
+```
+
+### Track Section
+
+Tracks are composed of three different types of instructions: sequence, channel, and note layer. The sequence contains instructions for controlling the overall sequence itself. Channels are defined at the sequence level, with at most sixteen channels running at the same time. Each channel can then reference zero or more note layers, where the actual note instructions will be referenced. Most of the instructions are specific to these subsections and are not interchangeable, aside from the *Branching instructions*, which are supported with all three. A sequence *always* starts with sequence instructions.
+
+Tracks are executed by the **sequence player**, as defined in `audio_seqplayer.c`. The sequence player is capable of executing one track at a time, with sixteen simultaneous channels, each channel typically supporting four note layers. A tick counter allows the player to track the execution time of a sequence. Ticks increment based by the tempo.
+
+All instructions in a track section are executed simultaneously unless a delay command is specified, in which case subsequent instructions will only run after that number of ticks have elapsed while playing the sequence.
+
+A track can loop (potentially) indefinitely by using branching instructions, or can end if the sequence command `end` is encountered. This will end processing of the sequence, and the sequence player will no longer process any further instructions until a new sequence is started.
+
+#### Long Notes Versus Short Notes
+
+The sequence format supports two different ways of representing note instructions in binary: long and short.
+
+Short notes only encode the pitch being played and optionally the note duration (delay). This can provide significant space savings when the notes being played are all using the same gate and velocity (a drum section, for example, with a continuous drum roll). There are dedicated instructions that allow you to change the gate and velocity parameters, either setting default values or changing the parameters for following notes.
+
+Long notes, in comparison, encode the pitch and velocity with each command, in addition to either the duration, gate length, or both. This provides better space savings compared to short notes if the gate or velocity parameters change frequently with each note, as it can take two or more bytes to do this with short notes rather than one additional byte with the long note. Long note mode is recommended most with melodic sections, where your instruments are intended to be more expressive.
+
+#### Sequence Subsections
+
+##### Sequence Registers
+
+Certain instructions support loading or storing values and utilize a register associated to the sequence for this task. For documentation purposes, this is referred to as the `$V` register. This register is one byte in size; most instructions treat it as a signed value.
+
+##### IO Ports
+
+Each sequence player contains 8 IO ports that are one byte in size each. These ports can be used to communicate state information between other parts of the game engine, or across different parts of the sequence. For example, a sequence script could use an IO port that, when set to a certain value, changes what instrument is used.
+
+##### Metainstructions
+
+**.sequence** *label name*
+
+**Description:** Defines a label for the following subsection of sequence instructions. Note that it is considered an error if a sequence label is proceeded with anything that is not a sequence command.
+
+**Example:**
+```
+.sequence loop_start
+ldchan 1, chan1_melody
+delay 500
+jump loop_start # Plays the same melody indefinitely.
+```
+
+##### Instructions
+
+| | 00 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | A0 | B0 | C0 | D0 | E0 | F0 |
+| -- | -------- | -- | -- | -- | -------- | ----- | ----- | ---- | ---- | ------ | ------- | ----- | --------- | ----------- | -- | ------------- |
+| 00 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | | notealloc | | freenotelist |
+| 01 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | | ldshortgate | | allocnotelist |
+| 02 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | | ldshortvel | | *rbltz |
+| 03 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | | mutebhv | | *rbeqz |
+| 04 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | runseq | mute | | *rjump |
+| 05 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | scriptctr | mutescale | | *bgez |
+| 06 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | stop | | | *break |
+| 07 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | stseq | initchan | | *loopend |
+| 08 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | sub | | | *loop |
+| 09 | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | and | fadescale | | *bltz |
+| 0A | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | | fade | | *beqz |
+| 0B | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | | fadetovol | | *jump |
+| 0C | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | ldi | tempochg | | *call |
+| 0D | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | dyncall | tempo | | *delay |
+| 0E | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | rand | rtranspose | | *delay1 |
+| 0F | testchan | | | | stopchan | subio | ldres | stio | ldio | ldchan | rldchan | ldseq | | transpose | | *end |
+
+Instructions marked with an asterisk (\*) are documented in the section *Branching Instructions*.
+
+**testchan** *N*
+
+**Description:** Stores whether or not channel *N* is currently active in `$V`. If the channel is active, `$V` will equal `0`, otherwise it will equal `1`.
+
+**Parameters:**
+* `N` [integer: 0-15] - The channel number to test.
+
+**Example:**
+```
+.sequence wait_until_done
+delay1
+testchan 1
+beqz wait_until_done
+# Instructions here only execute once channel 1 reaches an end command.
+```
+
+**stopchan** *N*
+
+**Description:** Stops channel *N* from executing any further instructions. Any notes currently playing on the channel will cease.
+
+**Parameters:**
+* `N` [integer: 0-15] - The channel number to stop.
+
+**Example:**
+```
+ldchan 0, chan0
+ldchan 1, chan1
+delay 50
+stopchan 1 # Stops channel 1 after 50 ticks, even if there's additional instructions.
+```
+
+**subio** *N*
+
+**Description:** Subtracts from `$V` whatever value is in IO port *N*.
+
+**Parameters:**
+* `N` [integer: 0-7] - The IO port to read.
+
+**Example:**
+```
+# Assume that the current value in $V is 5 and the current value in IO port 1 is -5.
+subio 1
+stio 0
+# IO port 0 now contains the current value of $V, which is 0.
+```
+
+**ldres** *IO*, *type*, *index*
+
+**Description:** Loads an audio resource into memory asynchronously. The type of resource is specified via *type*, where 0 is a sequence, 1 is a soundfont, and 2 is a sample bank. The IO parameter is used to track the status of the loading process. The audio subsystem will update this value to 0 once the resource has been loaded. Note that the IO port doesn't change this value to anything but 0 first, so it's recommended to set the IO port to a non-zero value prior to using `ldres`.
+
+Unlike the dedicated `ldseq` command, this does not assign the loaded sequence to a sequence player for playback. This was likely intended to be paired with `runseq`, since the sequence would be loaded into the pool and ready for playback immediately and wouldn't introduce any processing lag. Unfortunately, with the way the pools are designed, this is suboptimal and could introduce issues.
+
+As a best practice, if you want to do dynamic sequence changes, allocate a buffer inside your sequence and use `ldseq` to load it into the buffer and call it as a sequence function. If you want to change the sequence being played by another sequence player, you must use the `ldres` and `runseq` instructions.
+
+You do not need to use this command to load sample banks or soundfonts. There are no instructions to allow a sequence to use an arbitrary soundfont, and any soundfonts assigned to a sequence are preemptively loaded into the pool prior to the sequence player initializing. The engine also already handles loading sample banks and samples automatically, so there are no useful situations where you would need to use this command with sample banks.
+
+**Parameters:**
+* `IO` [integer: 0-7] - The IO port to use for tracking the asynchronous load status.
+* `type` [integer: 0-2] - The type of resource to load.
+* `index` [integer: 0-255] - The index of the resource to load from the table.
+
+**Example:**
+```
+ldi -1
+stio 5
+ldres 5, 0, 10 # Loads sequence 10 and signals the load in IO port 5.
+.sequence wait_for_sequence
+delay1
+ldio 5
+bltz wait_for_sequence
+```
+
+**stio** *IO*
+
+**Description:** Stores the current value in `$V` into the IO port specified.
+
+**Parameters:**
+* `IO` [integer: 0-7] - The IO port to store the contents of `$V` into.
+
+**Example:**
+```
+ldi 10
+stio 0 # Stores the value 10 into IO port 0.
+```
+
+**ldio** *IO*
+
+**Description:** Reads the value in the specified IO port and stores it in `$V`.
+
+**Parameters:**
+* `IO` [integer: 0-7] - The IO port to read from.
+
+**Example:**
+```
+ldio 1 # Reads the value in IO port 1 and stores in $V.
+stseq 0, volchange+1 # Writes the value in $V to the next instruction's first parameter.
+.sequence volchange
+fadetovol 0 # Changes the sequence player's volume to the value in $V.
+```
+
+**ldchan** *N* *label*
+
+**Description:** Assigns a channel script to the specified channel, which will begin executing on the current tick. If the channel already was executing a script, the channel will immediately begin executing this script's instructions instead. The label must be a channel label.
+
+**Parameters:**
+* `N` [integer: 0-15] - The channel to assign the script to.
+* `label` [channel label] - The label of channel instructions to assign to the channel.
+
+**Example:**
+```
+ldchan 0, chan0
+...
+
+.channel chan0
+resetchan
+end
+```
+
+**rldchan** *N* *label*
+
+**Description:** Assigns a channel script to the specified channel, similar in functionality to `ldchan`. The only difference between this command and `ldchan` is that this uses a relative offset versus an absolute offset when converted to binary form. Use this when the sequence's position in memory is not guaranteed to be in a certain position (for example, when using `ldseq`).
+
+**Parameters:**
+* `N` [integer: 0-15] - The channel to assign the script to.
+* `label` [channel label] - The label of channel instructions to assign to the channel.
+
+**Example:**
+```
+rldchan 0, chan0
+...
+
+.channel chan0
+resetchan
+end
+```
+
+**ldseq** *IO* *index* *label*
+
+**Description:** Loads the specified sequence asynchronously into the buffer space specified by the given label. The IO port will be used to signal when the sequence has been fully loaded into the buffer. The enum `SlowLoadStatus` is used by the audio subsystem to indicate the current loading status. The IO port will be set to 3 on the tick that the sequence is loaded, and then 0 after.
+
+Note that the sequence player and audio subsystem are unable to detect if a buffer overflow will occur when loading the sequence. Be certain that the buffer you use is large enough to contain the loaded sequence, otherwise the load could corrupt the main sequence or other parts of the sequence player's state.
+
+**Parameters:**
+* `IO` [integer: 0-7] - The IO port to use for tracking the load of the sequence.
+* `index` [integer: 0-127] - The sequence ID to be loaded into the buffer.
+* `label` [buffer label] - The buffer to load the sequence into.
+
+**Example:**
+```
+rand 2 # Randomly loads either sequence 5 or 10.
+beqz .load_seq_5
+ldseq 0, 10, seqbuf # Loads sequence 10 into the buffer.
+jump wait_for_load
+.sequence load_seq_5
+ldseq 0, 5, seqbuf # Loads sequence 5 into the buffer.
+.sequence wait_for_load
+delay1
+ldio 0
+bltz wait_for_load # If IO port 0 is not 0, continue waiting for sequence to load.
+dyncall bufptr # Call the sequence in seqbuf as a subroutine.
+end
+
+.data
+
+.table bufptr
+.entry seqbuf
+
+.buffer seqbuf # A buffer that the sequence will be loaded into.
+.space 0x2048 # The buffer is 2KB in size.
+```
+
+**runseq** *player*, *index*
+
+**Description:** Instructs the specified sequence player to play the specified sequence. Unlike most instructions, this one operates synchronously and will block execution of the current sequence script until the command finishes (presumably, this is to avoid potential race conditions if you replace the sequence in the current sequence player). If you want to specifically change the sequence being played by the current player, you can use `0xFF` for the player.
+
+If this command modifies the current sequence player, the sequence player will reset and no longer execute the original script. Otherwise, the sequence player will continue to play once the other sequence player has finished loading.
+
+**Parameters:**
+* `player` [integer: 0-3, 255] - The sequence player to modify. If 255, use current.
+* `index` [integer: 0-127] - The sequence index to load into the sequence player.
+
+**Example:**
+```
+# Assumes that this script is running in sequence player 0.
+runseq 1, 5 # Instructs sequence player 1 to load and play sequence 5. This sequence will not
+ # continue until sequence player 1 finishes loading.
+```
+
+**scriptctr** *counter*
+
+**Description:** Changes the current script counter. Note that this counter increments, but never is used by the audio subsystem otherwise. This should not be confused for the tick or tempo.
+
+**Parameters:**
+* `counter` [integer: 0-65535] - What to set the counter value to.
+
+**Example:**
+```
+scriptctr 0 # Sets the script counter to 0. This has no impact on the sequence itself.
+```
+
+**halt**
+
+**Description:** Halts any further processing of the current sequence after this tick.
+
+**Parameters:** None.
+
+**Example:**
+```
+ldchan 1, chan1
+halt # Channel 1 will run for one tick before the script ends.
+```
+
+**stseq** *val*, *offset/label*
+
+**Description:** Writes the total of `$V` + `val` to the offset within the sequence script in its binary form. The easiest way to use this command is to use a label within the script pointing to the command/data you wish to modify.
+
+Note that this instruction modifies the sequence script itself and is a form of self-modifying code. This can be leveraged to make highly dynamic sequences (and is used to great effect in the sound effects sequence), but using it improperly can easily cause sequence corruption and undefined behavior.
+
+**Parameters:**
+* `val` [integer: 0-255] - Constant to add to `$V`.
+* `offset/label` [integer: 0-32767 or any label] - Offset or label to location in sequence to be modified.
+
+**Example:**
+```
+ldchan 5, chan5
+ldi 7
+stseq 0, chan5_instr+1 # Changes the instrument specified in chan5 to 7.
+delay 500
+end
+
+.channel chan5
+short
+.channel chan5_instr
+instr 3
+...
+```
+
+**sub** *val*
+
+**Description:** Subtracts the specified integer from the current value stored in the `$V` register.
+
+**Parameters:**
+* `val` [integer: 0-255] - Value to subtract
+
+**Example:**
+```
+ldio 3 # Load value from IO port 3 into $V
+sub 2 # $V -= 2
+stio 3 # Store $V to IO port 3
+```
+
+**and** *val*
+
+**Description:** Performs a bitwise and operation between the value stored in the `$V` register and the value specified.
+
+**Parameters:**
+* `val` [integer: 0-255] - Value to perform a bitwise and with
+
+**Example:**
+```
+ldio 3 # Load value from IO port 3 into $V
+and 0xF0 # Set lower four bits to 0
+stio 2 # Store resulting value into IO port 2
+```
+
+**ldi** *val*
+
+**Description:** Sets the `$V` register to the provided integer.
+
+**Parameters:**
+* `val` [integer: 0-255] - Value to load into the register
+
+**Example:**
+```
+ldi 2 # $V = 2
+stio 0 # Set IO port 0 to 2
+```
+
+**dyncall** *table*
+
+**Description:** Makes a function call using an entry from the specified table in a data section. The value in the `$V` register is treated as the index to look up within the table. Once an `end` command is reached in the called function, the player will return back and execute the next instruction after this one.
+
+If `$V` is currently set to -1 or the call depth is at 3, then the function call will fail and be skipped. Note that the sequence player does not perform any bounds checking on `$V`; if it's larger than the table, the sequence player will jump to a potentially unexpected location in the script and could result in undefined behavior.
+
+**Parameters:**
+* `table` [table label] - A label to an entry table
+
+**Example:**
+```
+rand 3
+dyncall play_funcs
+.sequence wait_for_finish
+delay1
+ldio 7
+bltz wait_for_finish
+end
+
+.sequence option1
+... instructions for one sequence ...
+end
+
+.sequence option2
+... instructions for a completely different sequence ...
+end
+
+.sequence option3
+... instructions for a remixed sequence between the two ...
+end
+
+.data
+
+.table play_funcs
+.entry option1
+.entry option2
+.entry option3
+```
+
+**rand** *max*
+
+**Description:** Assigns a random integer to the `$V` register between `0` (inclusive) and `max` (exclusive). If `max` is 0, then it will be any random value between `-128` (inclusive) and `127`.
+
+Note that a side effect of the implementation for this command is that if a maximum of 1 is used, then this will always set `$V` to 0. In addition, the `$V` register is signed even though the random value is calculated entirely with unsigned values. As a result, although you can set the maximum to a value larger than 127, it is not recommended as this will not interact well with most other instructions.
+
+**Parameters:**
+* `max` [integer: 0-255] - The maximum (exclusive) to use for the random value, or 0 for any random value to be chosen
+
+**Example:**
+```
+rand 50 # $V = value between 0 and 49
+stseq 50, volume+1 # vol param set to $V + 50
+volmode 1 # Set volume mode to fade
+.sequence volume
+vol 0 # Change volume to $V + 50
+```
+
+**notealloc** *mask*
+
+**Description:** Sets the note allocation policy based on the provided flags. This policy is applied to any channels initialized after this command executes. The bitmask uses the following flags:
+
+* 0b0001 - The note layer will reuse the same note when another note is played.
+* 0b0010 - Only allocates notes from the channel's current reserved note pool.
+* 0b0100 - Only allocates notes from the channel or sequence's reserved note pool.
+* 0b1000 - Only allocates notes from the global note pool.
+
+If none of the upper three bits are set, then the note will be allocated from any available source (channel, sequence player, or global). The audio subsystem will first try the channel reserved pool, then the sequence player reserved pool, and finally the global note pool.
+
+This policy is assigned to the channels when the `initchan` command is executed; using this command after the channels are initialized will have no effect unless `initchan` is called again.
+
+**Parameters:**
+* `mask` [integer: 0-15] - The note allocation policy to use.
+
+**Example:**
+```
+notealloc 0b0010 # Channels 0 and 1 will always play notes from the channel's pool
+ldchan 0, violin # without replacing any playing notes
+ldchan 1, strings
+notealloc 0b0101 # Channels 3 and 9 will play notes from the channel or sequence's pools
+ldchan 3, piano # and replace playing notes if needed
+ldchan 9, percussion
+notealloc 0b1000 # Channel 4 will play notes from any free note list without any stealing
+ldchan 4, triangle
+```
+
+**ldshortgatearr** *array*
+
+**Description:** Loads the specified byte array of note gate values into the sequence player. This array can be used in the note layer by the `ldshortgate` command. This allows you to change gate values for consecutive notes with only a single byte, however only up to 16 values can be read from the array.
+
+Note that the short note gate array applies across all channels and note layers in the sequence player. If the array is changed at any point, this will also change the gate array for all note layers simultaneously. This will not affect the gate values already loaded.
+
+If this command is not used but the `ldshortgate` is used, the gate value will be read from `gDefaultShortNoteGateTimeTable`, which consists of the following values:
+
+`{ 229, 203, 177, 151, 139, 126, 113, 100, 87, 74, 61, 48, 36, 23, 10, 0 }`
+
+**Parameters:**
+* `array` [array label] - Label to an array in a data section containing up to sixteen bytes.
+
+**Example:**
+```
+ldshortgatearr shortgates # Assigns the array shortgates to the player's short note lookup table
+ldchan 0, chan0 # Loads channel 0
+delay 500
+end
+
+.channel chan0
+short # Activates short note mode on this channel
+ldlayer layer0 # Loads note layer 0 for this channel
+delay 500
+end
+
+.layer layer0
+ldshortgate 5 # Loads gate value at index 5 (150) to be used for subsequent notes.
+notedvg PITCH_C4, 6, 0 # Plays C4 with gate 27 and duration of 6 ticks.
+notevg PITCH_D4, 6, 0 # Plays D4 with gate 27 and the same duration as previous.
+notevg PITCH_F4, 6, 0
+ldshortgate 3 # Loads gate value at index 3 (100) to be used for subsequent notes.
+notevg PITCH_G4, 6, 0 # Plays G4 with gate 10 and same duration as previous.
+notevg PITCH_G4, 6, 0
+notevg PITCH_C5, 6, 0
+
+.data
+
+.array shortgates
+.byte 20
+.byte 50
+.byte 80
+.byte 100
+.byte 120
+.byte 150
+.byte 180
+```
+
+**ldshortvelarr** *array*
+
+**Description:** Loads the specified byte array of note velocity values into the sequence player. This array can be used in the note layer by the `ldshortvel` command. This allows you to change velocity values for consecutive notes with only a single byte, however only up to 16 values can be read from the array.
+
+Note that the short note velocity array applies across all channels and note layers in the sequence player. If the array is changed at any point, this will also change the velocity array for all note layers simultaneously. This will not affect the velocity values already loaded.
+
+If this command is not used but the `ldshortvel` is used, the velocity value will be read from `gDefaultShortNoteVelocityTable`, which consists of the following values:
+
+`{ 12, 25, 38, 51, 57, 64, 71, 76, 83, 89, 96, 102, 109, 115, 121, 127 }`
+
+**Parameters:**
+* `array` [array label] - Label to an array in a data section containing up to sixteen bytes.
+
+**Example:**
+```
+ldshortvelarr shortvels # Assigns the array shortgates to the player's short note lookup table
+ldchan 0, chan0 # Loads channel 0
+delay 500
+end
+
+.channel chan0
+short # Activates short note mode on this channel
+ldlayer layer0 # Loads note layer 0 for this channel
+delay 500
+end
+
+.layer layer0
+ldshortvel 5 # Loads gate value at index 5 (27) to be used for subsequent notes.
+notedvg PITCH_C4, 6, 0 # Plays C4 with gate 27 and duration of 6 ticks.
+notevg PITCH_D4, 6, 0 # Plays D4 with gate 27 and the same duration as previous.
+notevg PITCH_F4, 6, 0
+ldshortgate 3 # Loads gate value at index 3 (10) to be used for subsequent notes.
+notevg PITCH_G4, 6, 0 # Plays G4 with gate 10 and same duration as previous.
+notevg PITCH_G4, 6, 0
+notevg PITCH_C5, 6, 0
+
+.data
+
+.array shortvel
+.byte 4
+.byte 5
+.byte 8
+.byte 10
+.byte 20
+.byte 27
+.byte 50
+```
+
+**mutebhv** *mask*
+
+**Description:** Defines the sequence player's behavior when the mute mode is enabled. The following flags can be ORed together and provided in the `mask` parameter. This behavior is assigned to the channels when the `initchan` command is executed; using this command after the channels are initialized will have no effect unless `initchan` is called again.
+
+* 0b00000001 - Unused.
+* 0b00000010 - Unused.
+* 0b00000100 - Unused.
+* 0b00001000 - Immediately stops playing notes when muted.
+* 0b00010000 - All note layers will stop playing any new notes when muted. Old notes will play for their remaining duration.
+* 0b00100000 - Reduces the sequence player's volume by the mute volume scale when muted.
+* 0b01000000 - All note layers will stop playing any new notes and cut off old notes when muted.
+* 0b10000000 - Stops processing completely when muted.
+
+The default mute behavior for the sequence player is 0b01100000.
+
+Note that the mute behavior mostly is only affected by the `mute` command. The game also supports dynamic muting via the channel command `STOPSOMETHING2`, which will stop playing new notes for that channel (this operates separately from the mute behavior). It also supports toggling mute mode for all sequence players via audio instructions `0xF1` and `0xF2`.
+
+**Parameters:**
+* `mask` [integer: 0-65535] - The default mute behavior for the sequence.
+
+**Example:**
+```
+mutebhv 0x20 # Sets mute behavior to reduce volume.
+mutescale 63 # Scales volume to 49.6%.
+ldchan 1, chan1 # Plays channel 1 at full volume.
+delay 500
+mute # Plays channel 1 at half volume.
+delay 500
+end
+```
+
+**mute**
+
+**Description:** Activates mute mode for the sequence player. How this is treated depends on the behavior set by `mutebhv`. By default, the player will reduce volume and also immediately stop playing all notes.
+
+Once mute has been activated, it cannot be disabled again via command.
+
+**Parameters:** None.
+
+**Example:**
+```
+ldchan 1, chan1 # Starts playing channel 1.
+delay 500
+mute # Mutes the sequence.
+delay 40
+end
+```
+
+**mutescale** *numerator*
+
+**Description:** Sets the fractional value that should be applied to the sequence's current volume when mute mode is enabled. The value passed in the parameter will be divided by 127 and the result stored in the sequence player's configuration. Unlike `mutebhv`, this can be used at any point in the sequence to change the mute scale factor.
+
+For example, if set to 127 and the sequence is muted, the volume will not reduce at all. If set to 80, the volume will reduce by 63%. If set to 0, the volume will mute entirely. Using a value larger than 127 will result in undefined behavior, as this will result in a negative scale factor. By default, this will be set to 100%.
+
+This scaling factor is only used if flag 0x20 is set in the sequence player's mute behavior.
+
+**Parameters:**
+* `numerator` [integer: 0-127] - The number to divide by 127
+
+**Example:**
+```
+mutebhv 0x20 # Sets mute behavior to reduce sequence volume when muted
+mutescale 40 # Reduce volume by 31.5% when muted
+ldchan 1, chan1 # Play channel 1 at 100% volume
+delay 500
+mute # Channel 1 continues playing at 31.5% volume
+```
+
+**initchan** *mask*
+
+**Description:** Initializes the indicated channels on the sequence player and prepares them for playing audio. This configure's the channels with the default soundfont, assigned mute behavior, and configured note allocation policy. Each bit on the bitmask represents a different channel, with the most significant bit representing channel 16 and the least significant bit representing channel 1.
+
+It is not strictly necessary to use `initchan` for the channels to be used, however the previous mentioned settings will not be configured on the channel and will be in an undefined state. For obvious reasons, this is not recommended.
+
+**Parameters:**
+* `mask` [integer: 0-65535] - The bitmask defining the channels to initialize.
+
+**Example:**
+```
+mutebhv 0x20
+initchan 0b0000000100111110
+ldchan 1, chan1
+ldchan 2, chan2
+ldchan 3, chan3
+ldchan 4, chan4
+ldchan 5, chan5
+ldchan 8, chan8
+```
+
+**fadescale** *numerator*
+
+**Description:** Specifies a scaling factor that should be applied to the final volume whenever the sequence is fading its volume. Similar to `mutescale`, the provided numerator is divided by `127` and then stored in the sequence player until fading is activated. Note that while it's possible to apply a value larger than 127, it will result in unusual behavior, as this byte is treated as signed and will result in a negative fraction.
+
+**Parameters:**
+* `numerator` [integer: 0-127] - The number to divide by 127
+
+**Example:**
+```
+fadescale 89 # Sets the fade scale factor to 70%
+volmode 1 # Sets the fade mode to gradual
+vol 30 # Gradually fades to 23.6%
+delay 100
+volmode 2
+```
+
+**tempochg** *difference*
+
+**Description:** Applies a delta to the sequence's current tempo based on the parameter. The difference is treated as a signed byte and applied to the primary tempo on all subsequent ticks. Subsequent calls of `tempochg` will change the delta applied to the primary tempo. If the difference provided is 0, then the sequence will continue playing with the primary tempo.
+
+**Parameters:**
+* `difference` [integer: -128-127] - The change to apply to the main tempo
+
+**Example:**
+```
+tempo 80 # Sets primary tempo to 80 BPM
+ldchan 1, chan1
+delay 400
+tempochg 20 # Temporarily brings the tempo up to 100 BPM
+delay 400
+tempochg 0 # Returns the tempo back to 80 BPM
+delay 400
+```
+
+**tempo** *tempo*
+
+**Description:** Sets the primary tempo for the sequence. If the tempo provided is 0, it will be set to 1 instead. If the tempo is larger than the maximum tempo supported by the sequence player, it will be reduced to the highest tempo possible.
+
+**Parameters:**
+* `tempo` [integer: 0-255] - The primary tempo for the sequence
+
+**Example:**
+```
+tempo 60 # Sets primary tempo to 60 BPM
+ldchan 1, chan1
+delay 100 # Plays for 100 ticks, or approximately 2 beats
+```
+
+**rtranspose** *transposition*
+
+**Description:** Applies a relative transposition for notes played on all channels on this sequence player. Subsequent calls of this command will continue to add the provided transposition to the current transposition on the sequence player. By default, the sequence player's transposition is set to 0.
+
+The player's transposition is stored as a 16-bit signed integer. If you apply a transposition that's larger than 32767, this will result in an integer overflow. In practice, this should not be an issue.
+
+Sequence transpositions are ignored by drum and sound effects.
+
+**Parameters:**
+* `transposition` [integer: -128-127] - The relative change to apply to the current transposition
+
+**Example:**
+```
+transpose 10 # Transposes the notes played up by 10 semitones
+delay 50
+rtranspose -5 # Changes the transposition to 5 semitones above base
+delay 50
+```
+
+**transpose** *transposition*
+
+**Description:** Applies a transposition for notes played on all channels on this sequence player. Unlike `rtranspose`, this forces the transposition to the number of semitones. By default, the sequence player's transposition is set to 0.
+
+The player's transposition is stored as a 16-bit signed integer. If you apply a transposition that's larger than 32767, this will result in an integer overflow. In practice, this should not be an issue.
+
+Sequence transpositions are ignored by drum and sound effects.
+
+**Parameters:**
+* `transposition` [integer: -128-127] - The number of semitones to transpose by
+
+**Example:**
+```
+transpose 10 # Transposes the notes played up by 10 semitones
+delay 50
+```
+
+**freenotelist**
+
+**Description:** Frees the notes reserved on the sequence player and returns them back to the global note pool.
+
+It's recommended to avoid using this command while audio is playing for the sequence, as it can cause undefined behavior.
+
+**Parameters:** None.
+
+**Example:**
+```
+ldchan 1, chan1
+ldchan 9, chan9
+delay 1500
+freenotelist # Frees any reserved notes on the sequence player.
+```
+
+**allocnotelist** *count*
+
+**Description:** Frees any reserved notes assigned to the sequence player, then reserves the number of notes requested for the sequence player. The notes in this pool can then be used by channels and note layers when needed, depending on the note allocation policy set.
+
+It's recommended to avoid using this command while audio is playing on the sequence, as this can result in undefined behavior.
+
+In general, it is not necessary to use this command, as by default the sequence player will use any free notes in the global note pool. This command also is not useful for addressing issues with notes cutting out on channels in a sequence, as this applies to the sequence player itself. Howver, it can be useful for preventing other sequences from stealing notes from this sequence.
+
+**Parameters:**
+* `count` [integer: 0-255] - The number of notes to allocate.
+
+**Example:**
+```
+allocnotelist 10 # Reserves 10 notes to the sequence.
+ldchan 5, chan5 # Regardless of the number of effects or sequences playing, 10 notes will always
+ldchan 6, chan6 # be able to play at any point.
+delay 500
+freenotelist # Releases the reserved notes.
+delay 500 # Now the player may not be able to play notes if there aren't enough in the
+ # global pool.
+```
+
+#### Channel Subsections
+
+##### Channel Registers
+
+Every channel contains two registers that instructions can use for mathematical calculations, loading and storing values, and referencing data sections. Like the sequence player, there is an eight-bit `$V` register that's used mainly for loading and storing values, and a sixteen-bit `$P` register used as an offset pointer for indirect references within the channel script.
+
+##### IO Ports
+
+Similar to the sequence player, each channel contains its own dedicated eight IO ports that are one byte wide. These ports can be used to store or communicate values across different portions of the channel script.
+
+Channels also have access to the sequence player's IO ports, allowing values to be sent across different levels as needed. Keep in mind that since each channel's script runs in parallel, you will want to ensure that channels do not write back to the same IO port on the sequence player in a destructive fashion. (These instructions are executed in a single thread, so it is safe for different channels to modify the same IO port if, for example, the script was configured to modify one bit while leaving the rest unmodified.)
+
+##### Metainstructions
+
+**.channel** *label name*
+
+**Description:** Defines a label for the following subsection of channel instructions. Note that it is considered an error if a channel label is proceeded with anything that is not a channel command.
+
+**Example:**
+```
+.channel loop_start
+ldlayer 1, legatobar
+delay 500
+jump loop_start # Plays the same melody indefinitely.
+```
+
+##### Instructions
+
+| | 00 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | A0 | B0 | C0 | D0 | E0 | F0 |
+| -- | ------ | --------- | ------ | ----- | ----- | ----- | ---- | -------- | --------- | ---------- | -- | ----------- | ------------ | ----------- | ------------ | ------------- |
+| 00 | cdelay | sample | ldchan | stcio | ldcio | subio | ldio | stio | testlayer | freelayer | | filter | | effects | volexp | freenotelist |
+| 01 | cdelay | sample | ldchan | stcio | ldcio | subio | ldio | stio | testlayer | freelayer | | freefilter | instr | notealloc | vibfreqgrad | allocnotelist |
+| 02 | cdelay | sample | ldchan | stcio | ldcio | subio | ldio | stio | testlayer | freelayer | | ldseqtoptr | dyntbl | sustain | vibdepthgrad | *rbltz |
+| 03 | cdelay | sample | ldchan | stcio | ldcio | subio | ldio | stio | testlayer | freelayer | | ldfilter | short | bend | vibdelay | *rbeqz |
+| 04 | cdelay | sample | ldchan | stcio | ldcio | subio | ldio | stio | testlayer | freelayer | | ptrtodyntbl | noshort | reverb | dyncall | *rjump |
+| 05 | cdelay | sample | ldchan | stcio | ldcio | subio | ldio | stio | testlayer | freelayer | | dyntbltoptr | dyntbllookup | | rvrbidx | *bgez |
+| 06 | cdelay | sample | ldchan | stcio | ldcio | subio | ldio | stio | testlayer | freelayer | | dyntblv | font | | samplbook | *break |
+| 07 | cdelay | sample | ldchan | stcio | ldcio | subio | ldio | stio | testlayer | freelayer | | randtoptr | stseq | vibfreq | ldparams | *loopend |
+| 08 | cdelay | sampleptr | ldchan | stcio | ldcio | subio | ldio | rldlayer | ldlayer | dynldlayer | | randvel | sub | vibdepth | params | *loop |
+| 09 | cdelay | sampleptr | ldchan | stcio | ldcio | subio | ldio | rldlayer | ldlayer | dynldlayer | | randgate | and | releaserate | notepri | *bltz |
+| 0A | cdelay | sampleptr | ldchan | stcio | ldcio | subio | ldio | rldlayer | ldlayer | dynldlayer | | | mutebhv | env | stop | *beqz |
+| 0B | cdelay | sampleptr | ldchan | stcio | ldcio | subio | ldio | rldlayer | ldlayer | dynldlayer | | ptradd | ldseq | transpose | fontinstr | *jump |
+| 0C | cdelay | sampleptr | ldchan | stcio | ldcio | subio | ldio | rldlayer | ldlayer | dynldlayer | | randptr | ldi | panweight | reset | *call |
+| 0D | cdelay | sampleptr | ldchan | stcio | ldcio | subio | ldio | rldlayer | ldlayer | dynldlayer | | instr | stopchan | pan | gain | *delay |
+| 0E | cdelay | sampleptr | ldchan | stcio | ldcio | subio | ldio | rldlayer | ldlayer | dynldlayer | | | lditoptr | preqscale | bendfine | *delay1 |
+| 0F | cdelay | sampleptr | ldchan | stcio | ldcio | subio | ldio | rldlayer | ldlayer | dynldlayer | | | stptrtoseq | vol | | *end |
+
+Instructions marked with an asterisk (\*) are documented in the section *Branching Instructions*.
+
+**cdelay** *ticks*
+
+**Description:** Delays processing of the channel script by the provided number of ticks (up to 16). A delay of 0 is effectively a no-op.
+
+This command is functionally identical to `delay`, with a reduced range and encoded as a single byte for better script compression.
+
+**Parameters:**
+* `ticks` [integer: 0-15] - The number of ticks to delay further processing.
+
+**Example:**
+```
+ldlayer 1, melody
+ldlayer 2, harmony
+vol 30 # Gradually fade in
+cdelay 14
+vol 45
+cdelay 14
+vol 60
+cdelay 14
+vol 75
+```
+
+**sample** *IO*
+
+**Description:** Loads
\ No newline at end of file
diff --git a/extract_assets.py b/extract_assets.py
index 3548172c51c..e0dd65ad231 100755
--- a/extract_assets.py
+++ b/extract_assets.py
@@ -134,11 +134,13 @@ def main():
msgdis.extract_all_text(extract_text_path, extract_staff_text_path)
xmlFiles = []
+ ignorePaths = ['samples', 'sequences', 'soundfonts']
for currentPath, _, files in os.walk(os.path.join("assets", "xml")):
- for file in files:
- fullPath = os.path.join(currentPath, file)
- if file.endswith(".xml"):
- xmlFiles.append(fullPath)
+ if all(path not in currentPath for path in ignorePaths):
+ for file in files:
+ fullPath = os.path.join(currentPath, file)
+ if file.endswith(".xml"):
+ xmlFiles.append(fullPath)
try:
numCores = int(args.jobs or 0)
diff --git a/include/sequence.inc b/include/sequence.inc
new file mode 100644
index 00000000000..e2286e68b9d
--- /dev/null
+++ b/include/sequence.inc
@@ -0,0 +1,190 @@
+# Cache Policies
+.define CACHE_PERMANENT 0
+.define CACHE_PERSISTENT 1
+.define CACHE_TEMPORARY 2
+.define CACHE_ANY 3
+.define CACHE_ANYNOSYNC 4
+
+# Hardcoded Instruments
+.define FONTANY_INSTR_SFX 126
+.define FONTANY_INSTR_DRUM 127
+# (implemented via gWaveSamples[])
+.define FONTANY_INSTR_SAWTOOTH 128
+.define FONTANY_INSTR_TRIANGLE 129
+.define FONTANY_INSTR_SINE 130
+.define FONTANY_INSTR_SQUARE 131
+.define FONTANY_INSTR_NOISE 132
+.define FONTANY_INSTR_BELL 133
+.define FONTANY_INSTR_8PULSE 134
+.define FONTANY_INSTR_4PULSE 135
+.define FONTANY_INSTR_ASM_NOISE 136
+
+# Instrument Notes
+.define PITCH_A0 0
+.define PITCH_BF0 1
+.define PITCH_B0 2
+.define PITCH_C1 3
+.define PITCH_DF1 4
+.define PITCH_D1 5
+.define PITCH_EF1 6
+.define PITCH_E1 7
+.define PITCH_F1 8
+.define PITCH_GF1 9
+.define PITCH_G1 10
+.define PITCH_AF1 11
+.define PITCH_A1 12
+.define PITCH_BF1 13
+.define PITCH_B1 14
+.define PITCH_C2 15
+.define PITCH_DF2 16
+.define PITCH_D2 17
+.define PITCH_EF2 18
+.define PITCH_E2 19
+.define PITCH_F2 20
+.define PITCH_GF2 21
+.define PITCH_G2 22
+.define PITCH_AF2 23
+.define PITCH_A2 24
+.define PITCH_BF2 25
+.define PITCH_B2 26
+.define PITCH_C3 27
+.define PITCH_DF3 28
+.define PITCH_D3 29
+.define PITCH_EF3 30
+.define PITCH_E3 31
+.define PITCH_F3 32
+.define PITCH_GF3 33
+.define PITCH_G3 34
+.define PITCH_AF3 35
+.define PITCH_A3 36
+.define PITCH_BF3 37
+.define PITCH_B3 38
+.define PITCH_C4 39
+.define PITCH_DF4 40
+.define PITCH_D4 41
+.define PITCH_EF4 42
+.define PITCH_E4 43
+.define PITCH_F4 44
+.define PITCH_GF4 45
+.define PITCH_G4 46
+.define PITCH_AF4 47
+.define PITCH_A4 48
+.define PITCH_BF4 49
+.define PITCH_B4 50
+.define PITCH_C5 51
+.define PITCH_DF5 52
+.define PITCH_D5 53
+.define PITCH_EF5 54
+.define PITCH_E5 55
+.define PITCH_F5 56
+.define PITCH_GF5 57
+.define PITCH_G5 58
+.define PITCH_AF5 59
+.define PITCH_A5 60
+.define PITCH_BF5 61
+.define PITCH_B5 62
+.define PITCH_C6 63
+.define PITCH_DF6 64
+.define PITCH_D6 65
+.define PITCH_EF6 66
+.define PITCH_E6 67
+.define PITCH_F6 68
+.define PITCH_GF6 69
+.define PITCH_G6 70
+.define PITCH_AF6 71
+.define PITCH_A6 72
+.define PITCH_BF6 73
+.define PITCH_B6 74
+.define PITCH_C7 75
+.define PITCH_DF7 76
+.define PITCH_D7 77
+.define PITCH_EF7 78
+.define PITCH_E7 79
+.define PITCH_F7 80
+.define PITCH_GF7 81
+.define PITCH_G7 82
+.define PITCH_AF7 83
+.define PITCH_A7 84
+.define PITCH_BF7 85
+.define PITCH_B7 86
+.define PITCH_C8 87
+.define PITCH_DF8 88
+.define PITCH_D8 89
+.define PITCH_EF8 90
+.define PITCH_E8 91
+.define PITCH_F8 92
+.define PITCH_GF8 93
+.define PITCH_G8 94
+.define PITCH_AF8 95
+.define PITCH_A8 96
+.define PITCH_BF8 97
+.define PITCH_B8 98
+.define PITCH_C9 99
+.define PITCH_DF9 100
+.define PITCH_D9 101
+.define PITCH_EF9 102
+.define PITCH_E9 103
+.define PITCH_F9 104
+.define PITCH_GF9 105
+.define PITCH_G9 106
+.define PITCH_AF9 107
+.define PITCH_A9 108
+.define PITCH_BF9 109
+.define PITCH_B9 110
+.define PITCH_C10 111
+.define PITCH_DF10 112
+.define PITCH_D10 113
+.define PITCH_EF10 114
+.define PITCH_E10 115
+.define PITCH_F10 116
+.define PITCH_BFNEG1 117
+.define PITCH_BNEG1 118
+.define PITCH_C0 119
+.define PITCH_DF0 120
+.define PITCH_D0 121
+.define PITCH_EF0 122
+.define PITCH_E0 123
+.define PITCH_F0 124
+.define PITCH_GF0 125
+.define PITCH_G0 126
+.define PITCH_AF0 127
+
+# Soundfont IDs
+.define SOUNDFONT_SFX_1 0
+.define SOUNDFONT_SFX_2 1
+.define SOUNDFONT_AMBIENCE 2
+.define SOUNDFONT_ORCHESTRA 3
+.define SOUNDFONT_DEKU_TREE 4
+.define SOUNDFONT_MARKET 5
+.define SOUNDFONT_TITLE 6
+.define SOUNDFONT_JABU_JABU 7
+.define SOUNDFONT_KAKARIKO_CHILD 8
+.define SOUNDFONT_FAIRY_FOUNTAIN 9
+.define SOUNDFONT_FIRE_TEMPLE 10
+.define SOUNDFONT_DODONGO_CAVERN 11
+.define SOUNDFONT_FOREST_TEMPLE 12
+.define SOUNDFONT_LON_LON_RANCH 13
+.define SOUNDFONT_GORON_CITY 14
+.define SOUNDFONT_KOKIRI_FOREST 15
+.define SOUNDFONT_SPIRIT_TEMPLE 16
+.define SOUNDFONT_HORSE_RACE 17
+.define SOUNDFONT_WARP_SONGS 18
+.define SOUNDFONT_LEGENDS 19
+.define SOUNDFONT_MINIGAMES 20
+.define SOUNDFONT_ZORA_DOMAIN 21
+.define SOUNDFONT_SHOPS 22
+.define SOUNDFONT_ICE_CAVERN 23
+.define SOUNDFONT_SHADOW_TEMPLE 24
+.define SOUNDFONT_WATER_TEMPLE 25
+.define SOUNDFONT_UNKNOWN_1 26
+.define SOUNDFONT_GERUDO_VALLEY 27
+.define SOUNDFONT_LAKESIDE_LABORATORY 28
+.define SOUNDFONT_KOTAKE_KOUME_THEME 29
+.define SOUNDFONT_GANON_CASTLE_ORGAN 30
+.define SOUNDFONT_GANON_CASTLE 31
+.define SOUNDFONT_GANONDORF_BATTLE 32
+.define SOUNDFONT_ENDING_1 33
+.define SOUNDFONT_ENDING_2 34
+.define SOUNDFONT_GAME_OVER 35
+.define SOUNDFONT_OWL_THEME 36
+.define SOUNDFONT_UNKNOWN_2 37
diff --git a/include/z64audio.h b/include/z64audio.h
index b08a6558ef9..0a1ac95cef3 100644
--- a/include/z64audio.h
+++ b/include/z64audio.h
@@ -54,6 +54,14 @@ typedef enum {
/* 2 */ SAMPLE_TABLE
} SampleBankTableType;
+typedef enum {
+ /* 0 */ CACHE_LOAD_PERMANENT,
+ /* 1 */ CACHE_LOAD_PERSISTENT,
+ /* 2 */ CACHE_LOAD_TEMPORARY,
+ /* 3 */ CACHE_LOAD_EITHER,
+ /* 4 */ CACHE_LOAD_EITHER_NOSYNC
+} AudioCacheLoadType;
+
typedef enum {
/* 0 */ CACHE_TEMPORARY,
/* 1 */ CACHE_PERSISTENT,
@@ -122,13 +130,13 @@ typedef struct {
/* 0x04 */ u32 end;
/* 0x08 */ u32 count;
/* 0x0C */ char unk_0C[0x4];
- /* 0x10 */ s16 predictorState[16]; // only exists if count != 0. 8-byte aligned
+ /* 0x10 */ s16 predictorState[16]; // The predictor output state for the first frame of the loop, only present if count > 0
} AdpcmLoop; // size = 0x30 (or 0x10)
typedef struct {
/* 0x00 */ s32 order;
/* 0x04 */ s32 numPredictors;
- /* 0x08 */ s16 book[1]; // size 8 * order * numPredictors. 8-byte aligned
+ /* 0x08 */ s16 book[1]; // Predictor coefficients, where book is a variable-length array, each book's length is 8 * order * npredictors. 8-byte aligned
} AdpcmBook; // size >= 0x8
typedef struct {
diff --git a/spec b/spec
index 7265476c1b2..cb372a082af 100644
--- a/spec
+++ b/spec
@@ -122,18 +122,172 @@ endseg
beginseg
name "Audiobank"
- address 0x10 // fake RAM address to avoid map lookup inaccuracies
- include "build/baserom/Audiobank.o"
+ include "build/assets/soundfonts/0_Sound_Effects_1.o"
+ include "build/assets/soundfonts/1_Sound_Effects_2.o"
+ include "build/assets/soundfonts/2_Ambient_Sounds.o"
+ include "build/assets/soundfonts/3_Orchestra.o"
+ include "build/assets/soundfonts/4_Deku_Tree.o"
+ include "build/assets/soundfonts/5_Market.o"
+ include "build/assets/soundfonts/6_Title_Theme.o"
+ include "build/assets/soundfonts/7_Jabu_Jabu.o"
+ include "build/assets/soundfonts/8_Child_Kakariko_Village.o"
+ include "build/assets/soundfonts/9_Fairy_Fountain.o"
+ include "build/assets/soundfonts/10_Fire_Temple.o"
+ include "build/assets/soundfonts/11_Dodongos_Cavern.o"
+ include "build/assets/soundfonts/12_Forest_Temple.o"
+ include "build/assets/soundfonts/13_Lon_Lon_Ranch.o"
+ include "build/assets/soundfonts/14_Goron_City.o"
+ include "build/assets/soundfonts/15_Kokiri_Forest.o"
+ include "build/assets/soundfonts/16_Spirit_Temple.o"
+ include "build/assets/soundfonts/17_Horse_Race.o"
+ include "build/assets/soundfonts/18_Warp_Songs.o"
+ include "build/assets/soundfonts/19_Legends_of_Hyrule.o"
+ include "build/assets/soundfonts/20_Minigames.o"
+ include "build/assets/soundfonts/21_Zoras_Domain.o"
+ include "build/assets/soundfonts/22_Shops.o"
+ include "build/assets/soundfonts/23_Ice_Cavern.o"
+ include "build/assets/soundfonts/24_Shadow_Temple.o"
+ include "build/assets/soundfonts/25_Water_Temple.o"
+ include "build/assets/soundfonts/26_Unused.o"
+ include "build/assets/soundfonts/27_Gerudo_Valley.o"
+ include "build/assets/soundfonts/28_Lakeside_Laboratory.o"
+ include "build/assets/soundfonts/29_Kotake_and_Koumes_Theme.o"
+ include "build/assets/soundfonts/30_Ganons_Castle_Organ.o"
+ include "build/assets/soundfonts/31_Ganons_Castle.o"
+ include "build/assets/soundfonts/32_Ganondorfs_Battle.o"
+ include "build/assets/soundfonts/33_Ending_1.o"
+ include "build/assets/soundfonts/34_Ending_2.o"
+ include "build/assets/soundfonts/35_Game_Over.o"
+ include "build/assets/soundfonts/36_Kaepora_Gaeboras_Theme.o"
+ include "build/assets/soundfonts/37_Unused_Deku_Tree.o"
+ include "build/data/audio_pad.rodata.o"
endseg
beginseg
name "Audioseq"
- include "build/baserom/Audioseq.o"
+ include "build/assets/sequences/000_Sound_Effects.prg.o"
+ include "build/assets/sequences/001_Ambient_Effects.prg.o"
+ include "build/assets/sequences/002_Hyrule_Field_Program.prg.o"
+ include "build/assets/sequences/003_Hyrule_Field_Intro.o"
+ include "build/assets/sequences/004_Hyrule_Field_Segment_1.o"
+ include "build/assets/sequences/005_Hyrule_Field_Segment_2.o"
+ include "build/assets/sequences/006_Hyrule_Field_Segment_3.o"
+ include "build/assets/sequences/007_Hyrule_Field_Segment_4.o"
+ include "build/assets/sequences/008_Hyrule_Field_Segment_5.o"
+ include "build/assets/sequences/009_Hyrule_Field_Segment_6.o"
+ include "build/assets/sequences/010_Hyrule_Field_Segment_7.o"
+ include "build/assets/sequences/011_Hyrule_Field_Segment_8.o"
+ include "build/assets/sequences/012_Hyrule_Field_Segment_9.o"
+ include "build/assets/sequences/013_Hyrule_Field_Segment_10.o"
+ include "build/assets/sequences/014_Hyrule_Field_Segment_11.o"
+ include "build/assets/sequences/015_Hyrule_Field_Enemy_Intro.o"
+ include "build/assets/sequences/016_Hyrule_Field_Enemy_1.o"
+ include "build/assets/sequences/017_Hyrule_Field_Enemy_2.o"
+ include "build/assets/sequences/018_Hyrule_Field_Enemy_3.o"
+ include "build/assets/sequences/019_Hyrule_Field_Enemy_4.o"
+ include "build/assets/sequences/020_Hyrule_Field_Idle_1.o"
+ include "build/assets/sequences/021_Hyrule_Field_Idle_2.o"
+ include "build/assets/sequences/022_Hyrule_Field_Idle_3.o"
+ include "build/assets/sequences/023_Hyrule_Field_Idle_4.o"
+ include "build/assets/sequences/024_Dodongos_Cavern.o"
+ include "build/assets/sequences/025_Kakariko_Village_Adult.o"
+ include "build/assets/sequences/026_Battle.o"
+ include "build/assets/sequences/027_Boss_Battle.o"
+ include "build/assets/sequences/028_Inside_the_Deku_Tree.o"
+ include "build/assets/sequences/029_Market.o"
+ include "build/assets/sequences/030_Title_Theme.o"
+ include "build/assets/sequences/031_House.o"
+ include "build/assets/sequences/032_Game_Over.o"
+ include "build/assets/sequences/033_Boss_Defeated.o"
+ include "build/assets/sequences/034_Got_Key_Item.o"
+ include "build/assets/sequences/035_Ganondorf_Sting.o"
+ include "build/assets/sequences/036_Got_Heart_Container.o"
+ include "build/assets/sequences/037_Prelude_of_Light.o"
+ include "build/assets/sequences/038_Inside_Jabu_Jabus_Belly.o"
+ include "build/assets/sequences/039_Kakariko_Village_Child.o"
+ include "build/assets/sequences/040_Fairy_Fountain.o"
+ include "build/assets/sequences/041_Zeldas_Theme.o"
+ include "build/assets/sequences/042_Fire_Temple.o"
+ include "build/assets/sequences/043_Anticipating_Treasure.o"
+ include "build/assets/sequences/044_Forest_Temple.o"
+ include "build/assets/sequences/045_Hyrule_Castle_Courtyard.o"
+ include "build/assets/sequences/046_Ganondorf_Theme_Organ.o"
+ include "build/assets/sequences/047_Lon_Lon_Ranch.o"
+ include "build/assets/sequences/048_Goron_City.o"
+ include "build/assets/sequences/049_Hyrule_Field_Morning.o"
+ include "build/assets/sequences/050_Got_Spiritual_Stone.o"
+ include "build/assets/sequences/051_Bolero_of_Fire.o"
+ include "build/assets/sequences/052_Minuet_of_Forest.o"
+ include "build/assets/sequences/053_Serenade_of_Water.o"
+ include "build/assets/sequences/054_Requiem_of_Spirit.o"
+ include "build/assets/sequences/055_Nocturne_of_Shadow.o"
+ include "build/assets/sequences/056_Mini_Boss_Battle.o"
+ include "build/assets/sequences/057_Got_Item.o"
+ include "build/assets/sequences/058_Temple_of_Time.o"
+ include "build/assets/sequences/059_Rescued_Epona.o"
+ include "build/assets/sequences/060_Kokiri_Forest.o"
+ include "build/assets/sequences/061_Got_Fairy_Ocarina.o"
+ include "build/assets/sequences/062_Lost_Woods.o"
+ include "build/assets/sequences/063_Spirit_Temple.o"
+ include "build/assets/sequences/064_Horse_Minigame.o"
+ include "build/assets/sequences/065_Horse_Minigame_Goal.o"
+ include "build/assets/sequences/066_Ingos_Theme.o"
+ include "build/assets/sequences/067_Got_Medallion.o"
+ include "build/assets/sequences/068_Sarias_Song.o"
+ include "build/assets/sequences/069_Eponas_Song.o"
+ include "build/assets/sequences/070_Zeldas_Lullaby.o"
+ include "build/assets/sequences/071_Suns_Song.o"
+ include "build/assets/sequences/072_Song_of_Time.o"
+ include "build/assets/sequences/073_Song_of_Storms.o"
+ include "build/assets/sequences/074_Navi_in_Flight.o"
+ include "build/assets/sequences/075_Deku_Tree_Theme.o"
+ include "build/assets/sequences/076_Windmill.o"
+ include "build/assets/sequences/077_Legends_of_Hyrule.o"
+ include "build/assets/sequences/078_Game_Shops.o"
+ include "build/assets/sequences/079_Sheiks_Theme.o"
+ include "build/assets/sequences/080_Zoras_Domain.o"
+ include "build/assets/sequences/081_Zelda_Sting.o"
+ include "build/assets/sequences/082_Zeldas_Theme_Ending.o"
+ include "build/assets/sequences/083_Got_Master_Sword.o"
+ include "build/assets/sequences/084_Ganondorfs_Theme.o"
+ include "build/assets/sequences/085_Shop.o"
+ include "build/assets/sequences/086_Chamber_of_Sages.o"
+ include "build/assets/sequences/088_Ice_Cavern.o"
+ include "build/assets/sequences/089_Opening_the_Door_of_Time.o"
+ include "build/assets/sequences/090_Kaepora_Gaeboras_Theme.o"
+ include "build/assets/sequences/091_Shadow_Temple.o"
+ include "build/assets/sequences/092_Water_Temple.o"
+ include "build/assets/sequences/093_The_Sages_Bridge.o"
+ include "build/assets/sequences/094_Seal_of_the_Six_Sages.o"
+ include "build/assets/sequences/095_Gerudo_Valley.o"
+ include "build/assets/sequences/096_Potion_Shop.o"
+ include "build/assets/sequences/097_Koume_and_Kotakes_Theme.o"
+ include "build/assets/sequences/098_Escape_from_Ganons_Castle.o"
+ include "build/assets/sequences/099_Ganondorfs_Castle.o"
+ include "build/assets/sequences/100_Ganondorf_Battle.o"
+ include "build/assets/sequences/101_Ganon_Battle.o"
+ include "build/assets/sequences/102_Ending_Credits_1.o"
+ include "build/assets/sequences/103_Ending_Credits_2.o"
+ include "build/assets/sequences/104_Ending_Credits_3.o"
+ include "build/assets/sequences/105_Ending_Credits_4.o"
+ include "build/assets/sequences/106_Ending_Credits_5.o"
+ include "build/assets/sequences/107_Dodongo_and_Volvagia_Battle.o"
+ include "build/assets/sequences/108_Timed_Minigame.o"
+ include "build/assets/sequences/109_Cutscene_Effects.prg.o"
+ /*include "build/assets/sequences/110_Trip_to_Skye.o"
+ include "build/assets/sequences/111_Lothlorien.o"
+ include "build/assets/sequences/112_FF6_Overworld.o"
+ include "build/assets/sequences/113_FF7_Airship.o"*/
endseg
beginseg
name "Audiotable"
- include "build/baserom/Audiotable.o"
+ include "build/assets/samplebanks/0_Sound_Effects.o"
+ include "build/assets/samplebanks/2_Inside_the_Deku_Tree.o"
+ include "build/assets/samplebanks/3_Inside_Jabu_Jabu.o"
+ include "build/assets/samplebanks/4_Forest_Temple__Unused_.o"
+ include "build/assets/samplebanks/5_Goron_City.o"
+ include "build/assets/samplebanks/6_Spirit_Temple.o"
endseg
beginseg
@@ -517,7 +671,10 @@ beginseg
include_data_with_rodata "build/src/code/z_message_PAL.o"
include "build/src/code/z_game_over.o"
include "build/src/code/z_construct.o"
- include "build/data/audio_tables.rodata.o"
+ include_data_with_rodata "build/assets/data/SoundFontTable.o"
+ include_data_with_rodata "build/assets/data/SequenceFontTable.o"
+ include_data_with_rodata "build/assets/data/SequenceTable.o"
+ include_data_with_rodata "build/assets/data/SampleBankTable.o"
include "build/data/rsp.text.o"
include "build/data/rsp.rodata.o"
endseg
diff --git a/src/code/audio_seqplayer.c b/src/code/audio_seqplayer.c
index 1bf38419bb7..ca418b92da3 100644
--- a/src/code/audio_seqplayer.c
+++ b/src/code/audio_seqplayer.c
@@ -1733,7 +1733,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
break;
case 0xDD:
- seqPlayer->tempo = AudioSeq_ScriptReadU8(seqScript) * 48;
+ seqPlayer->tempo = AudioSeq_ScriptReadU8(seqScript) * TATUMS_PER_BEAT;
if (seqPlayer->tempo > gAudioContext.tempoInternalToExternal) {
seqPlayer->tempo = (u16)gAudioContext.tempoInternalToExternal;
}
@@ -1743,7 +1743,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
break;
case 0xDC:
- seqPlayer->unk_0C = (s8)AudioSeq_ScriptReadU8(seqScript) * 48;
+ seqPlayer->unk_0C = (s8)AudioSeq_ScriptReadU8(seqScript) * TATUMS_PER_BEAT;
break;
case 0xDA:
diff --git a/tools/.gitignore b/tools/.gitignore
index 4dff1be3aee..b3b10da5a85 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -6,6 +6,11 @@ mkdmadata
mkldscript
reloc_prereq
vtxdis
+aifc_decode
+assemble_sequence
+aiff_extract_codebook
+tabledesign
+vadpcm_enc
yaz0
graphovl/
diff --git a/tools/Makefile b/tools/Makefile
index 4d342e24859..582d0097bec 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,5 +1,7 @@
CFLAGS := -Wall -Wextra -pedantic -std=c99 -g -O2
-PROGRAMS := elf2rom makeromfs mkdmadata mkldscript reloc_prereq vtxdis yaz0
+PROGRAMS := aifc_decode elf2rom makeromfs mkdmadata mkldscript reloc_prereq vtxdis yaz0
+CPPFLAGS := -Wall -Wextra -pedantic -std=c++17 -g -O2
+CPP_PROGRAMS := assemble_sequence
ifeq ($(shell command -v clang >/dev/null 2>&1; echo $$?),0)
CC := clang
@@ -30,18 +32,29 @@ distclean: clean
.PHONY: all clean distclean
-elf2rom_SOURCES := elf2rom.c elf32.c n64chksum.c util.c
-makeromfs_SOURCES := makeromfs.c n64chksum.c util.c
-mkdmadata_SOURCES := mkdmadata.c spec.c util.c
-mkldscript_SOURCES := mkldscript.c spec.c util.c
-reloc_prereq_SOURCES := reloc_prereq.c spec.c util.c
-vtxdis_SOURCES := vtxdis.c
-yaz0_SOURCES := yaz0tool.c yaz0.c util.c
+aifc_decode_SOURCES := aifc_decode.c
+assemble_sequence_SOURCES := assemble_sequence.cpp
+elf2rom_SOURCES := elf2rom.c elf32.c n64chksum.c util.c
+makeromfs_SOURCES := makeromfs.c n64chksum.c util.c
+mkdmadata_SOURCES := mkdmadata.c spec.c util.c
+mkldscript_SOURCES := mkldscript.c spec.c util.c
+reloc_prereq_SOURCES := reloc_prereq.c spec.c util.c
+vtxdis_SOURCES := vtxdis.c
+yaz0_SOURCES := yaz0tool.c yaz0.c util.c
+aifc_decode_LIBRARIES := -lm
+assemble_sequence_LIBRARIES := -lstdc++ -lm
define COMPILE =
$(1): $($1_SOURCES)
- $(CC) $(CFLAGS) $$^ -o $$@
+ $(CC) $(CFLAGS) -o $$@ $$^ $($1_LIBRARIES)
+endef
+
+define CPPCOMPILE =
+$(1): $($1_SOURCES)
+ $(CC) $(CPPFLAGS) -o $$@ $$^ $($1_LIBRARIES)
endef
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
+
+$(foreach p,$(CPP_PROGRAMS),$(eval $(call CPPCOMPILE,$(p))))
diff --git a/tools/aifc_decode.c b/tools/aifc_decode.c
new file mode 100644
index 00000000000..94a62dfca34
--- /dev/null
+++ b/tools/aifc_decode.c
@@ -0,0 +1,1035 @@
+/**
+ * Bruteforcing decoder for converting ADPCM-encoded AIFC into AIFF, in a way
+ * that roundtrips with vadpcm_enc.
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+typedef signed char s8;
+typedef short s16;
+typedef int s32;
+typedef long long s64;
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned int u32;
+typedef unsigned long long u64;
+typedef float f32;
+typedef double f64;
+
+#define bswap16(x) __builtin_bswap16(x)
+#define bswap32(x) __builtin_bswap32(x)
+#define BSWAP16(x) x = __builtin_bswap16(x)
+#define BSWAP32(x) x = __builtin_bswap32(x)
+#define BSWAP16_MANY(x, n) for (s32 _i = 0; _i < n; _i++) BSWAP16((x)[_i])
+
+#define NORETURN __attribute__((noreturn))
+#define UNUSED __attribute__((unused))
+
+typedef struct {
+ u32 ckID;
+ u32 ckSize;
+} ChunkHeader;
+
+typedef struct {
+ u32 ckID;
+ u32 ckSize;
+ u32 formType;
+} Chunk;
+
+typedef struct {
+ s16 numChannels;
+ u16 numFramesH;
+ u16 numFramesL;
+ s16 sampleSize;
+ s16 sampleRate[5]; // 80-bit float
+ u16 compressionTypeH;
+ u16 compressionTypeL;
+} CommonChunk;
+
+typedef struct {
+ s16 MarkerID;
+ u16 positionH;
+ u16 positionL;
+} Marker;
+
+typedef struct {
+ s16 playMode;
+ s16 beginLoop;
+ s16 endLoop;
+} Loop;
+
+typedef struct {
+ s8 baseNote;
+ s8 detune;
+ s8 lowNote;
+ s8 highNote;
+ s8 lowVelocity;
+ s8 highVelocity;
+ s16 gain;
+ Loop sustainLoop;
+ Loop releaseLoop;
+} InstrumentChunk;
+
+typedef struct {
+ s32 offset;
+ s32 blockSize;
+} SoundDataChunk;
+
+typedef struct {
+ s16 version;
+ s16 order;
+ s16 nEntries;
+} CodeChunk;
+
+typedef struct {
+ u32 start;
+ u32 end;
+ u32 count;
+ s16 state[16];
+} ALADPCMloop;
+
+
+static char usage[] = "input.aifc output.aiff";
+static const char *progname, *infilename;
+static int framesize = 9;
+
+#define checked_fread(a, b, c, d) if (fread(a, b, c, d) != c) fail_parse("error parsing file")
+
+NORETURN
+void fail_parse(const char *fmt, ...)
+{
+ char *formatted = NULL;
+ va_list ap;
+ va_start(ap, fmt);
+ int size = vsnprintf(NULL, 0, fmt, ap);
+ va_end(ap);
+ if (size >= 0) {
+ size++;
+ formatted = malloc(size);
+ if (formatted != NULL) {
+ va_start(ap, fmt);
+ size = vsnprintf(formatted, size, fmt, ap);
+ va_end(ap);
+ if (size < 0) {
+ free(formatted);
+ formatted = NULL;
+ }
+ }
+ }
+
+ if (formatted != NULL) {
+ fprintf(stderr, "%s: %s [%s]\n", progname, formatted, infilename);
+ free(formatted);
+ }
+ exit(1);
+}
+
+s32 myrand()
+{
+ static u64 state = 1619236481962341ULL;
+ state *= 3123692312237ULL;
+ state += 1;
+ return state >> 33;
+}
+
+s16 qsample(f32 x, s32 scale)
+{
+ if (x > 0.0f) {
+ return (s16) ((x / scale) + 0.4999999);
+ } else {
+ return (s16) ((x / scale) - 0.4999999);
+ }
+}
+
+void clamp_to_s16(f32 *in, s32 *out)
+{
+ f32 llevel = -0x8000;
+ f32 ulevel = 0x7fff;
+
+ for (s32 i = 0; i < 16; i++) {
+ if (in[i] > ulevel) in[i] = ulevel;
+ if (in[i] < llevel) in[i] = llevel;
+
+ if (in[i] > 0.0f) {
+ out[i] = (s32) (in[i] + 0.5);
+ } else {
+ out[i] = (s32) (in[i] - 0.5);
+ }
+ }
+}
+
+s16 clamp_bits(s32 x, s32 bits)
+{
+ s32 lim = 1 << (bits - 1);
+ if (x < -lim) return -lim;
+ if (x > lim - 1) return lim - 1;
+ return x;
+}
+
+s32 readaifccodebook(FILE *fhandle, s32 ****table, s16 *order, s16 *npredictors)
+{
+ checked_fread(order, sizeof(s16), 1, fhandle);
+ BSWAP16(*order);
+ checked_fread(npredictors, sizeof(s16), 1, fhandle);
+ BSWAP16(*npredictors);
+ *table = malloc(*npredictors * sizeof(s32 **));
+ for (s32 i = 0; i < *npredictors; i++) {
+ (*table)[i] = malloc(8 * sizeof(s32 *));
+ for (s32 j = 0; j < 8; j++) {
+ (*table)[i][j] = malloc((*order + 8) * sizeof(s32));
+ }
+ }
+
+ for (s32 i = 0; i < *npredictors; i++) {
+ s32 **table_entry = (*table)[i];
+ for (s32 j = 0; j < *order; j++) {
+ for (s32 k = 0; k < 8; k++) {
+ s16 ts;
+ checked_fread(&ts, sizeof(s16), 1, fhandle);
+ BSWAP16(ts);
+ table_entry[k][j] = ts;
+ }
+ }
+
+ for (s32 k = 1; k < 8; k++) {
+ table_entry[k][*order] = table_entry[k - 1][*order - 1];
+ }
+
+ table_entry[0][*order] = 1 << 11;
+
+ for (s32 k = 1; k < 8; k++) {
+ s32 j = 0;
+ for (; j < k; j++) {
+ table_entry[j][k + *order] = 0;
+ }
+
+ for (; j < 8; j++) {
+ table_entry[j][k + *order] = table_entry[j - k][*order];
+ }
+ }
+ }
+ return 0;
+}
+
+ALADPCMloop *readlooppoints(FILE *ifile, s16 *nloops)
+{
+ checked_fread(nloops, sizeof(s16), 1, ifile);
+ BSWAP16(*nloops);
+ ALADPCMloop *al = malloc(*nloops * sizeof(ALADPCMloop));
+ for (s32 i = 0; i < *nloops; i++) {
+ checked_fread(&al[i], sizeof(ALADPCMloop), 1, ifile);
+ BSWAP32(al[i].start);
+ BSWAP32(al[i].end);
+ BSWAP32(al[i].count);
+ BSWAP16_MANY(al[i].state, 16);
+ }
+ return al;
+}
+
+s32 inner_product(s32 length, s32 *v1, s32 *v2)
+{
+ s32 out = 0;
+ for (s32 i = 0; i < length; i++) {
+ out += v1[i] * v2[i];
+ }
+
+ // Compute "out / 2^11", rounded down.
+ s32 dout = out / (1 << 11);
+ s32 fiout = dout * (1 << 11);
+ return dout - (out - fiout < 0);
+}
+
+void my_decodeframe(u8 *frame, s32 *decompressed, s32 *state, s32 order, s32 ***coefTable)
+{
+ s32 ix[16];
+
+ u8 header = frame[0];
+ s32 scale = 1 << (header >> 4);
+ s32 optimalp = header & 0xf;
+
+ if (framesize == 5) {
+ for (s32 i = 0; i < 16; i += 4) {
+ u8 c = frame[1 + i/4];
+ ix[i] = c >> 6;
+ ix[i + 1] = (c >> 4) & 0x3;
+ ix[i + 2] = (c >> 2) & 0x3;
+ ix[i + 3] = c & 0x3;
+ }
+ } else {
+ for (s32 i = 0; i < 16; i += 2) {
+ u8 c = frame[1 + i/2];
+ ix[i] = c >> 4;
+ ix[i + 1] = c & 0xf;
+ }
+ }
+
+ for (s32 i = 0; i < 16; i++) {
+ if (framesize == 5) {
+ if (ix[i] >= 2) ix[i] -= 4;
+ } else {
+ if (ix[i] >= 8) ix[i] -= 16;
+ }
+ decompressed[i] = ix[i];
+ ix[i] *= scale;
+ }
+
+ for (s32 j = 0; j < 2; j++) {
+ s32 in_vec[16];
+ if (j == 0) {
+ for (s32 i = 0; i < order; i++) {
+ in_vec[i] = state[16 - order + i];
+ }
+ } else {
+ for (s32 i = 0; i < order; i++) {
+ in_vec[i] = state[8 - order + i];
+ }
+ }
+
+ for (s32 i = 0; i < 8; i++) {
+ s32 ind = j * 8 + i;
+ in_vec[order + i] = ix[ind];
+ state[ind] = inner_product(order + i, coefTable[optimalp][i], in_vec) + ix[ind];
+ }
+ }
+}
+
+void my_encodeframe(u8 *out, s16 *inBuffer, s32 *origState, s32 ***coefTable, s32 order, s32 npredictors)
+{
+ s16 ix[16];
+ s32 prediction[16];
+ s32 inVector[16];
+ s32 optimalp = 0;
+ s32 scale;
+ s32 encBits = (framesize == 5 ? 2 : 4);
+ s32 llevel = -(1 << (encBits - 1));
+ s32 ulevel = -llevel - 1;
+ s32 ie[16];
+ f32 e[16];
+ f32 min = 1e30;
+ s32 scaleFactor = 16 - encBits;
+
+ for (s32 k = 0; k < npredictors; k++) {
+ for (s32 j = 0; j < 2; j++) {
+ for (s32 i = 0; i < order; i++) {
+ inVector[i] = (j == 0 ? origState[16 - order + i] : inBuffer[8 - order + i]);
+ }
+
+ for (s32 i = 0; i < 8; i++) {
+ prediction[j * 8 + i] = inner_product(order + i, coefTable[k][i], inVector);
+ inVector[i + order] = inBuffer[j * 8 + i] - prediction[j * 8 + i];
+ e[j * 8 + i] = (f32) inVector[i + order];
+ }
+ }
+
+ f32 se = 0.0f;
+ for (s32 j = 0; j < 16; j++) {
+ se += e[j] * e[j];
+ }
+
+ if (se < min) {
+ min = se;
+ optimalp = k;
+ }
+ }
+
+ for (s32 j = 0; j < 2; j++) {
+ for (s32 i = 0; i < order; i++) {
+ inVector[i] = (j == 0 ? origState[16 - order + i] : inBuffer[8 - order + i]);
+ }
+
+ for (s32 i = 0; i < 8; i++) {
+ prediction[j * 8 + i] = inner_product(order + i, coefTable[optimalp][i], inVector);
+ e[j * 8 + i] = inVector[i + order] = inBuffer[j * 8 + i] - prediction[j * 8 + i];
+ }
+ }
+
+ clamp_to_s16(e, ie);
+
+ s32 max = 0;
+ for (s32 i = 0; i < 16; i++) {
+ if (abs(ie[i]) > abs(max)) {
+ max = ie[i];
+ }
+ }
+
+ for (scale = 0; scale <= scaleFactor; scale++) {
+ if (max <= ulevel && max >= llevel) break;
+ max /= 2;
+ }
+
+ s32 state[16];
+ for (s32 i = 0; i < 16; i++) {
+ state[i] = origState[i];
+ }
+
+ s32 nIter, again;
+ for (nIter = 0, again = 1; nIter < 2 && again; nIter++) {
+ again = 0;
+ if (nIter == 1) scale++;
+ if (scale > scaleFactor) {
+ scale = scaleFactor;
+ }
+
+ for (s32 j = 0; j < 2; j++) {
+ s32 base = j * 8;
+ for (s32 i = 0; i < order; i++) {
+ inVector[i] = (j == 0 ?
+ origState[16 - order + i] : state[8 - order + i]);
+ }
+
+ for (s32 i = 0; i < 8; i++) {
+ prediction[base + i] = inner_product(order + i, coefTable[optimalp][i], inVector);
+ f32 se = (f32) inBuffer[base + i] - (f32) prediction[base + i];
+ ix[base + i] = qsample(se, 1 << scale);
+ s32 cV = clamp_bits(ix[base + i], encBits) - ix[base + i];
+ if (cV > 1 || cV < -1) again = 1;
+ ix[base + i] += cV;
+ inVector[i + order] = ix[base + i] * (1 << scale);
+ state[base + i] = prediction[base + i] + inVector[i + order];
+ }
+ }
+ }
+
+ u8 header = (scale << 4) | (optimalp & 0xf);
+ out[0] = header;
+ if (framesize == 5) {
+ for (s32 i = 0; i < 16; i += 4) {
+ u8 c = ((ix[i] & 0x3) << 6) | ((ix[i + 1] & 0x3) << 4) | ((ix[i + 2] & 0x3) << 2) | (ix[i + 3] & 0x3);
+ out[1 + i/4] = c;
+ }
+ } else {
+ for (s32 i = 0; i < 16; i += 2) {
+ u8 c = ((ix[i] & 0xf) << 4) | (ix[i + 1] & 0xf);
+ out[1 + i/2] = c;
+ }
+ }
+}
+
+void permute(s32 *out, s32 *in, s32 *decompressed, s32 scale)
+{
+ int normal = myrand() % 3 == 0;
+ for (s32 i = 0; i < 16; i++) {
+ s32 lo = in[i] - scale / 2;
+ s32 hi = in[i] + scale / 2;
+ if (framesize == 9) {
+ if (decompressed[i] == -8 && myrand() % 10 == 0) lo -= scale * 3/2;
+ else if (decompressed[i] == 7 && myrand() % 10 == 0) hi += scale * 3/2;
+ }
+ else if (decompressed[i] == -2 && myrand() % 7 == 0) lo -= scale * 3/2;
+ else if (decompressed[i] == 1 && myrand() % 10 == 0) hi += scale * 3/2;
+ else if (normal) {}
+ else if (decompressed[i] == 0) {
+ if (myrand() % 3) {
+ lo = in[i] - scale / 5;
+ hi = in[i] + scale / 5;
+ }
+ else if (myrand() % 2) {
+ lo = in[i] - scale / 3;
+ hi = in[i] + scale / 3;
+ }
+ }
+ else if (myrand() % 3) {
+ if (decompressed[i] < 0) lo = in[i] + scale / 4;
+ if (decompressed[i] > 0) hi = in[i] - scale / 4;
+ }
+ else if (myrand() % 2) {
+ if (decompressed[i] < 0) lo = in[i] - scale / 4;
+ if (decompressed[i] > 0) hi = in[i] + scale / 4;
+ }
+ out[i] = clamp_bits(lo + myrand() % (hi - lo + 1), 16);
+ }
+}
+
+void get_bounds(s32 *in, s32 *decompressed, s32 scale, s32 *minVals, s32 *maxVals)
+{
+ s32 minv, maxv;
+ if (framesize == 9) {
+ minv = -8;
+ maxv = 7;
+ } else {
+ minv = -2;
+ maxv = 1;
+ }
+ for (s32 i = 0; i < 16; i++) {
+ s32 lo = in[i] - scale / 2;
+ s32 hi = in[i] + scale / 2;
+ lo -= scale;
+ hi += scale;
+ if (decompressed[i] == minv) lo -= scale;
+ else if (decompressed[i] == maxv) hi += scale;
+ minVals[i] = lo;
+ maxVals[i] = hi;
+ }
+}
+
+s64 scored_encode(s32 *inBuffer, s32 *origState, s32 ***coefTable, s32 order, s32 npredictors, s32 wantedPredictor, s32 wantedScale, s32 wantedIx[16])
+{
+ s32 prediction[16];
+ s32 inVector[16];
+ s32 optimalp = 0;
+ s32 scale;
+ s32 encBits = (framesize == 5 ? 2 : 4);
+ s32 llevel = -(1 << (encBits - 1));
+ s32 ulevel = -llevel - 1;
+ s32 ie[16];
+ f32 e[16];
+ f32 min = 1e30;
+ s32 scaleFactor = 16 - encBits;
+ f32 errs[4];
+ s64 scoreA = 0, scoreB = 0, scoreC = 0;
+
+ for (s32 k = 0; k < npredictors; k++) {
+ for (s32 j = 0; j < 2; j++) {
+ for (s32 i = 0; i < order; i++) {
+ inVector[i] = (j == 0 ? origState[16 - order + i] : inBuffer[8 - order + i]);
+ }
+
+ for (s32 i = 0; i < 8; i++) {
+ prediction[j * 8 + i] = inner_product(order + i, coefTable[k][i], inVector);
+ inVector[i + order] = inBuffer[j * 8 + i] - prediction[j * 8 + i];
+ e[j * 8 + i] = (f32) inVector[i + order];
+ }
+ }
+
+ f32 se = 0.0f;
+ for (s32 j = 0; j < 16; j++) {
+ se += e[j] * e[j];
+ }
+
+ errs[k] = se;
+
+ if (se < min) {
+ min = se;
+ optimalp = k;
+ }
+ }
+
+ for (s32 k = 0; k < npredictors; k++) {
+ if (errs[k] < errs[wantedPredictor]) {
+ scoreA += (s64)(errs[wantedPredictor] - errs[k]);
+ }
+ }
+ if (optimalp != wantedPredictor) {
+ // probably penalized above, but add extra penalty in case the error
+ // values were the exact same
+ scoreA += 1;
+ }
+ optimalp = wantedPredictor;
+
+ for (s32 j = 0; j < 2; j++) {
+ for (s32 i = 0; i < order; i++) {
+ inVector[i] = (j == 0 ? origState[16 - order + i] : inBuffer[8 - order + i]);
+ }
+
+ for (s32 i = 0; i < 8; i++) {
+ prediction[j * 8 + i] = inner_product(order + i, coefTable[optimalp][i], inVector);
+ e[j * 8 + i] = inVector[i + order] = inBuffer[j * 8 + i] - prediction[j * 8 + i];
+ }
+ }
+
+ clamp_to_s16(e, ie);
+
+ s32 max = 0;
+ for (s32 i = 0; i < 16; i++) {
+ if (abs(ie[i]) > abs(max)) {
+ max = ie[i];
+ }
+ }
+
+ for (scale = 0; scale <= scaleFactor; scale++) {
+ if (max <= ulevel && max >= llevel) break;
+ max /= 2;
+ }
+
+ // Preliminary ix computation, computes whether scale needs to be incremented
+ s32 state[16];
+ s32 again = 0;
+ for (s32 j = 0; j < 2; j++) {
+ s32 base = j * 8;
+ for (s32 i = 0; i < order; i++) {
+ inVector[i] = (j == 0 ?
+ origState[16 - order + i] : state[8 - order + i]);
+ }
+
+ for (s32 i = 0; i < 8; i++) {
+ prediction[base + i] = inner_product(order + i, coefTable[optimalp][i], inVector);
+ f32 se = (f32) inBuffer[base + i] - (f32) prediction[base + i];
+ s32 ix = qsample(se, 1 << scale);
+ s32 clampedIx = clamp_bits(ix, encBits);
+ s32 cV = clampedIx - ix;
+ if (cV > 1 || cV < -1) {
+ again = 1;
+ }
+ inVector[i + order] = clampedIx * (1 << scale);
+ state[base + i] = prediction[base + i] + inVector[i + order];
+ }
+ }
+
+ if (again && scale < scaleFactor) {
+ scale++;
+ }
+
+ if (scale != wantedScale) {
+ // We could do math to penalize scale mismatches accurately, but it's
+ // simpler to leave it as a constraint by setting an infinite penalty.
+ scoreB += 100000000;
+ scale = wantedScale;
+ }
+
+ // Then again for real, but now also with penalty computation
+ for (s32 j = 0; j < 2; j++) {
+ s32 base = j * 8;
+ for (s32 i = 0; i < order; i++) {
+ inVector[i] = (j == 0 ?
+ origState[16 - order + i] : state[8 - order + i]);
+ }
+
+ for (s32 i = 0; i < 8; i++) {
+ prediction[base + i] = inner_product(order + i, coefTable[optimalp][i], inVector);
+ s64 ise = (s64) inBuffer[base + i] - (s64) prediction[base + i];
+ f32 se = (f32) inBuffer[base + i] - (f32) prediction[base + i];
+ s32 ix = qsample(se, 1 << scale);
+ s32 clampedIx = clamp_bits(ix, encBits);
+ s32 val = wantedIx[base + i] * (1 << scale);
+ if (clampedIx != wantedIx[base + i]) {
+ assert(ix != wantedIx[base + i]);
+ s32 lo = val - (1 << scale) / 2;
+ s32 hi = val + (1 << scale) / 2;
+ s64 diff = 0;
+ if (ise < lo) diff = lo - ise;
+ else if (ise > hi) diff = ise - hi;
+ scoreC += diff * diff + 1;
+ }
+ inVector[i + order] = val;
+ state[base + i] = prediction[base + i] + val;
+ }
+ }
+
+ // Penalties for going outside s16
+ for (s32 i = 0; i < 16; i++) {
+ s64 diff = 0;
+ if (inBuffer[i] < -0x8000) diff = -0x8000 - inBuffer[i];
+ if (inBuffer[i] > 0x7fff) diff = inBuffer[i] - 0x7fff;
+ scoreC += diff * diff;
+ }
+
+ return scoreA + scoreB + 10 * scoreC;
+}
+
+s32 descent(s32 guess[16], s32 minVals[16], s32 maxVals[16], u8 input[9], s32 lastState[16], s32 ***coefTable, s32 order, s32 npredictors, s32 wantedPredictor, s32 wantedScale, s32 wantedIx[32])
+{
+ const f64 inf = 1e100;
+ s64 curScore = scored_encode(guess, lastState, coefTable, order, npredictors, wantedPredictor, wantedScale, wantedIx);
+ for (;;) {
+ f64 delta[16];
+ if (curScore == 0) {
+ return 1;
+ }
+
+ // Compute gradient, and how far to move along it at most.
+ f64 maxMove = inf;
+ for (s32 i = 0; i < 16; i++) {
+ guess[i] += 1;
+ s64 scoreUp = scored_encode(guess, lastState, coefTable, order, npredictors, wantedPredictor, wantedScale, wantedIx);
+ guess[i] -= 2;
+ s64 scoreDown = scored_encode(guess, lastState, coefTable, order, npredictors, wantedPredictor, wantedScale, wantedIx);
+ guess[i] += 1;
+ if (scoreUp >= curScore && scoreDown >= curScore) {
+ // Don't touch this coordinate
+ delta[i] = 0;
+ } else if (scoreDown < scoreUp) {
+ if (guess[i] == minVals[i]) {
+ // Don't allow moving out of bounds
+ delta[i] = 0;
+ } else {
+ delta[i] = -(f64)(curScore - scoreDown);
+ maxMove = fmin(maxMove, (minVals[i] - guess[i]) / delta[i]);
+ }
+ } else {
+ if (guess[i] == maxVals[i]) {
+ delta[i] = 0;
+ } else {
+ delta[i] = (f64)(curScore - scoreUp);
+ maxMove = fmin(maxMove, (maxVals[i] - guess[i]) / delta[i]);
+ }
+ }
+ }
+ if (maxMove == inf || maxMove <= 0) {
+ return 0;
+ }
+
+ // Try exponentially spaced candidates along the gradient.
+ s32 nguess[16];
+ s32 bestGuess[16];
+ s64 bestScore = curScore;
+ for (;;) {
+ s32 changed = 0;
+ for (s32 i = 0; i < 16; i++) {
+ nguess[i] = (s32)round(guess[i] + delta[i] * maxMove);
+ if (nguess[i] != guess[i]) changed = 1;
+ }
+ if (!changed) break;
+ s64 score = scored_encode(nguess, lastState, coefTable, order, npredictors, wantedPredictor, wantedScale, wantedIx);
+ if (score < bestScore) {
+ bestScore = score;
+ memcpy(bestGuess, nguess, sizeof(nguess));
+ }
+ maxMove *= 0.7;
+ }
+
+ if (bestScore == curScore) {
+ // No improvements along that line, give up.
+ return 0;
+ }
+ curScore = bestScore;
+ memcpy(guess, bestGuess, sizeof(bestGuess));
+ }
+}
+
+s32 bruteforce(s32 guess[16], u8 input[9], s32 decoded[16], s32 decompressed[16], s32 lastState[16], s32 ***coefTable, s32 order, s32 npredictors)
+{
+ s32 scale = input[0] >> 4, predictor = input[0] & 0xF;
+
+ s32 minVals[16], maxVals[16];
+ get_bounds(decoded, decompressed, 1 << scale, minVals, maxVals);
+
+ for (;;) {
+ s64 bestScore = -1;
+ s32 bestGuess[16];
+ for (s32 it = 0; it < 100; it++) {
+ permute(guess, decoded, decompressed, 1 << scale);
+ s64 score = scored_encode(guess, lastState, coefTable, order, npredictors, predictor, scale, decompressed);
+ if (score == 0) {
+ return 1;
+ }
+ if (bestScore == -1 || score < bestScore) {
+ bestScore = score;
+ memcpy(bestGuess, guess, sizeof(bestGuess));
+ }
+ }
+ memcpy(guess, bestGuess, sizeof(bestGuess));
+ if (descent(guess, minVals, maxVals, input, lastState, coefTable, order, npredictors, predictor, scale, decompressed)) {
+ return 1;
+ }
+ }
+}
+
+void write_header(FILE *ofile, const char *id, s32 size)
+{
+ fwrite(id, 4, 1, ofile);
+ BSWAP32(size);
+ fwrite(&size, sizeof(s32), 1, ofile);
+}
+
+int main(int argc, char **argv)
+{
+ s16 order = -1;
+ s16 nloops = 0;
+ ALADPCMloop *aloops = NULL;
+ s16 npredictors = -1;
+ s32 ***coefTable = NULL;
+ s32 state[16];
+ s32 decompressed[16];
+ s32 soundPointer = -1;
+ s32 currPos = 0;
+ s32 nSamples = 0;
+ Chunk FormChunk;
+ ChunkHeader Header;
+ CommonChunk CommChunk;
+ InstrumentChunk InstChunk;
+ SoundDataChunk SndDChunk;
+ FILE *ifile;
+ FILE *ofile;
+ progname = argv[0];
+
+ if (argc < 3) {
+ fprintf(stderr, "%s %s\n", progname, usage);
+ exit(1);
+ }
+
+ infilename = argv[1];
+
+ if ((ifile = fopen(infilename, "rb")) == NULL) {
+ fail_parse("AIFF-C file could not be opened");
+ exit(1);
+ }
+
+ if ((ofile = fopen(argv[2], "wb")) == NULL) {
+ fprintf(stderr, "%s: output file could not be opened [%s]\n", progname, argv[2]);
+ exit(1);
+ }
+
+ memset(&InstChunk, 0, sizeof(InstChunk));
+
+ checked_fread(&FormChunk, sizeof(FormChunk), 1, ifile);
+ BSWAP32(FormChunk.ckID);
+ BSWAP32(FormChunk.formType);
+ if ((FormChunk.ckID != 0x464f524d) || (FormChunk.formType != 0x41494643)) { // FORM, AIFC
+ fail_parse("not an AIFF-C file");
+ }
+
+ for (;;) {
+ s32 num = fread(&Header, sizeof(Header), 1, ifile);
+ u32 ts;
+ if (num <= 0) break;
+ BSWAP32(Header.ckID);
+ BSWAP32(Header.ckSize);
+
+ Header.ckSize++;
+ Header.ckSize &= ~1;
+ s32 offset = ftell(ifile);
+
+ switch (Header.ckID) {
+ case 0x434f4d4d: // COMM
+ checked_fread(&CommChunk, sizeof(CommChunk), 1, ifile);
+ BSWAP16(CommChunk.numChannels);
+ BSWAP16(CommChunk.numFramesH);
+ BSWAP16(CommChunk.numFramesL);
+ BSWAP16(CommChunk.sampleSize);
+ BSWAP16(CommChunk.compressionTypeH);
+ BSWAP16(CommChunk.compressionTypeL);
+ s32 cType = (CommChunk.compressionTypeH << 16) + CommChunk.compressionTypeL;
+ if (cType == 0x56415043 || cType == 0x41445039) { // VAPC or ADP9
+ framesize = 9;
+ } else if (cType == 0x41445035) { // ADP5
+ framesize = 5;
+ } else if (cType == 0x4850434d) { // HPCM
+ framesize = 16;
+ } else {
+ char comprType[5] = {
+ CommChunk.compressionTypeH >> 8,
+ CommChunk.compressionTypeH & 0xFF,
+ CommChunk.compressionTypeL >> 8,
+ CommChunk.compressionTypeL & 0xFF,
+ 0
+ };
+ fail_parse("file is of the wrong compression type [got %s (%08x)]", &comprType, cType);
+ }
+ if (CommChunk.numChannels != 1) {
+ fail_parse("file contains %d channels, only 1 channel supported", CommChunk.numChannels);
+ }
+ if (CommChunk.sampleSize != 16) {
+ fail_parse("file contains %d bit samples, only 16 bit samples supported", CommChunk.sampleSize);
+ }
+
+ nSamples = (CommChunk.numFramesH << 16) + CommChunk.numFramesL;
+
+ // Allow broken input lengths
+ if (nSamples % 16) {
+ nSamples -= (nSamples % 16);
+ }
+
+ if (nSamples % 16 != 0) {
+ fail_parse("number of chunks must be a multiple of 16, found %d with remainder %d", nSamples, nSamples % 16);
+ }
+ break;
+
+ case 0x53534e44: // SSND
+ checked_fread(&SndDChunk, sizeof(SndDChunk), 1, ifile);
+ BSWAP32(SndDChunk.offset);
+ BSWAP32(SndDChunk.blockSize);
+ assert(SndDChunk.offset == 0);
+ assert(SndDChunk.blockSize == 0);
+ soundPointer = ftell(ifile);
+ break;
+
+ case 0x4150504c: // APPL
+ checked_fread(&ts, sizeof(u32), 1, ifile);
+ BSWAP32(ts);
+ if (ts == 0x73746f63) { // stoc
+ u8 len;
+ checked_fread(&len, 1, 1, ifile);
+ if (len == 11) {
+ char ChunkName[12];
+ s16 version;
+ checked_fread(ChunkName, 11, 1, ifile);
+ ChunkName[11] = '\0';
+ if (strcmp("VADPCMCODES", ChunkName) == 0) {
+ checked_fread(&version, sizeof(s16), 1, ifile);
+ BSWAP16(version);
+ if (version != 1) {
+ fail_parse("Unknown codebook chunk version");
+ }
+ readaifccodebook(ifile, &coefTable, &order, &npredictors);
+ }
+ else if (strcmp("VADPCMLOOPS", ChunkName) == 0) {
+ checked_fread(&version, sizeof(s16), 1, ifile);
+ BSWAP16(version);
+ if (version != 1) {
+ fail_parse("Unknown loop chunk version");
+ }
+ aloops = readlooppoints(ifile, &nloops);
+ if (nloops != 1) {
+ fail_parse("Only a single loop supported");
+ }
+ }
+ }
+ }
+ break;
+ }
+
+ fseek(ifile, offset + Header.ckSize, SEEK_SET);
+ }
+
+ if (coefTable == NULL) {
+ fail_parse("Codebook missing from bitstream");
+ }
+
+ for (s32 i = 0; i < order; i++) {
+ state[15 - i] = 0;
+ }
+
+ u32 outputBytes = nSamples * sizeof(s16);
+ u8 *outputBuf = malloc(outputBytes);
+
+ fseek(ifile, soundPointer, SEEK_SET);
+ s32 fails = 0;
+ while (currPos < nSamples) {
+ u8 input[9];
+ u8 encoded[9];
+ s32 lastState[16];
+ s32 decoded[16];
+ s16 guess[16];
+ s16 origGuess[16];
+
+ memcpy(lastState, state, sizeof(state));
+ checked_fread(input, framesize, 1, ifile);
+
+ // Decode for real
+ my_decodeframe(input, decompressed, state, order, coefTable);
+ memcpy(decoded, state, sizeof(state));
+
+ // Create a guess from that, by clamping to 16 bits
+ for (s32 i = 0; i < 16; i++) {
+ origGuess[i] = clamp_bits(state[i], 16);
+ }
+
+ // Encode the guess
+ memcpy(guess, origGuess, sizeof(guess));
+ my_encodeframe(encoded, guess, lastState, coefTable, order, npredictors);
+
+ // If it doesn't match, bruteforce the matching.
+ if (memcmp(input, encoded, framesize) != 0) {
+ s32 guess32[16];
+ if (bruteforce(guess32, input, decoded, decompressed, lastState, coefTable, order, npredictors)) {
+ for (int i = 0; i < 16; i++) {
+ assert(-0x8000 <= guess32[i] && guess32[i] <= 0x7fff);
+ guess[i] = guess32[i];
+ }
+ my_encodeframe(encoded, guess, lastState, coefTable, order, npredictors);
+ assert(memcmp(input, encoded, framesize) == 0);
+ } else {
+ fails++;
+ fprintf(stderr, "FAIL [%d/%d]\n", currPos, nSamples);
+ }
+
+ // Bring the matching closer to the original decode (not strictly
+ // necessary, but it will move us closer to the target on average).
+ for (s32 failures = 0; failures < 50; failures++) {
+ s32 ind = myrand() % 16;
+ s32 old = guess[ind];
+ if (old == origGuess[ind]) continue;
+ guess[ind] = origGuess[ind];
+ if (myrand() % 2) guess[ind] += (old - origGuess[ind]) / 2;
+ my_encodeframe(encoded, guess, lastState, coefTable, order, npredictors);
+ if (memcmp(input, encoded, framesize) == 0) {
+ failures = -1;
+ }
+ else {
+ guess[ind] = old;
+ }
+ }
+ }
+
+ memcpy(state, decoded, sizeof(state));
+ BSWAP16_MANY(guess, 16);
+ memcpy(outputBuf + currPos * 2, guess, sizeof(guess));
+ currPos += 16;
+ }
+ if (fails) {
+ fprintf(stderr, "%s %d\n", infilename, fails);
+ }
+
+ // Write an incomplete file header. We'll fill in the size later.
+ fwrite("FORM\0\0\0\0AIFF", 12, 1, ofile);
+
+ // Subtract 4 from the COMM size to skip the compression field.
+ write_header(ofile, "COMM", sizeof(CommonChunk) - 4);
+ CommChunk.numFramesH = nSamples >> 16;
+ CommChunk.numFramesL = nSamples & 0xffff;
+ BSWAP16(CommChunk.numChannels);
+ BSWAP16(CommChunk.numFramesH);
+ BSWAP16(CommChunk.numFramesL);
+ BSWAP16(CommChunk.sampleSize);
+ fwrite(&CommChunk, sizeof(CommonChunk) - 4, 1, ofile);
+
+ if (nloops > 0) {
+ s32 startPos = aloops[0].start, endPos = aloops[0].end;
+ const char *markerNames[2] = {"start", "end"};
+ Marker markers[2] = {
+ {1, startPos >> 16, startPos & 0xffff},
+ {2, endPos >> 16, endPos & 0xffff}
+ };
+ write_header(ofile, "MARK", 2 + 2 * sizeof(Marker) + 1 + 5 + 1 + 3);
+ s16 numMarkers = bswap16(2);
+ fwrite(&numMarkers, sizeof(s16), 1, ofile);
+ for (s32 i = 0; i < 2; i++) {
+ u8 len = (u8) strlen(markerNames[i]);
+ BSWAP16(markers[i].MarkerID);
+ BSWAP16(markers[i].positionH);
+ BSWAP16(markers[i].positionL);
+ fwrite(&markers[i], sizeof(Marker), 1, ofile);
+ fwrite(&len, 1, 1, ofile);
+ fwrite(markerNames[i], len, 1, ofile);
+ }
+
+ write_header(ofile, "INST", sizeof(InstrumentChunk));
+ InstChunk.sustainLoop.playMode = bswap16(1);
+ InstChunk.sustainLoop.beginLoop = bswap16(1);
+ InstChunk.sustainLoop.endLoop = bswap16(2);
+ InstChunk.releaseLoop.playMode = 0;
+ InstChunk.releaseLoop.beginLoop = 0;
+ InstChunk.releaseLoop.endLoop = 0;
+ fwrite(&InstChunk, sizeof(InstrumentChunk), 1, ofile);
+ }
+
+ // Save the coefficient table for use when encoding. Ideally this wouldn't
+ // be needed and "tabledesign -s 1" would generate the right table, but in
+ // practice it's difficult to adjust samples to make that happen.
+ write_header(ofile, "APPL", 4 + 12 + sizeof(CodeChunk) + npredictors * order * 8 * 2);
+ fwrite("stoc", 4, 1, ofile);
+ CodeChunk cChunk;
+ cChunk.version = bswap16(1);
+ cChunk.order = bswap16(order);
+ cChunk.nEntries = bswap16(npredictors);
+ fwrite("\x0bVADPCMCODES", 12, 1, ofile);
+ fwrite(&cChunk, sizeof(CodeChunk), 1, ofile);
+ for (s32 i = 0; i < npredictors; i++) {
+ for (s32 j = 0; j < order; j++) {
+ for (s32 k = 0; k < 8; k++) {
+ s16 ts = bswap16(coefTable[i][k][j]);
+ fwrite(&ts, sizeof(s16), 1, ofile);
+ }
+ }
+ }
+
+ write_header(ofile, "SSND", outputBytes + 8);
+ SndDChunk.offset = 0;
+ SndDChunk.blockSize = 0;
+ fwrite(&SndDChunk, sizeof(SoundDataChunk), 1, ofile);
+ fwrite(outputBuf, outputBytes, 1, ofile);
+
+ // Fix the size in the header
+ s32 fileSize = bswap32(ftell(ofile) - 8);
+ fseek(ofile, 4, SEEK_SET);
+ fwrite(&fileSize, 4, 1, ofile);
+
+ fclose(ifile);
+ fclose(ofile);
+ return 0;
+}
diff --git a/tools/aiff_extract_codebook.c b/tools/aiff_extract_codebook.c
new file mode 100644
index 00000000000..78864e3801b
--- /dev/null
+++ b/tools/aiff_extract_codebook.c
@@ -0,0 +1,185 @@
+/**
+ * Create an ADPCM codebook either by extracting it from an AIFF section, or
+ * by executing tabledesign.
+ */
+#define _XOPEN_SOURCE 500
+#include
+#include
+#include
+#include
+#include
+#include
+
+typedef short s16;
+typedef int s32;
+typedef unsigned char u8;
+typedef unsigned int u32;
+
+#define BSWAP16(x) x = __builtin_bswap16(x)
+#define BSWAP32(x) x = __builtin_bswap32(x)
+
+#define NORETURN __attribute__((noreturn))
+#define UNUSED __attribute__((unused))
+
+typedef struct
+{
+ u32 start;
+ u32 end;
+ u32 count;
+ s16 state[16];
+} ALADPCMloop;
+
+static const char usage[] = "input.aiff";
+static const char *progname, *infilename;
+
+#define checked_fread(a, b, c, d) if (fread(a, b, c, d) != c) fail_parse("error parsing file")
+
+NORETURN
+void fail_parse(const char *fmt, ...)
+{
+ char *formatted = NULL;
+ va_list ap;
+ va_start(ap, fmt);
+ int size = vsnprintf(NULL, 0, fmt, ap);
+ va_end(ap);
+ if (size >= 0) {
+ size++;
+ formatted = malloc(size);
+ if (formatted != NULL) {
+ va_start(ap, fmt);
+ size = vsnprintf(formatted, size, fmt, ap);
+ va_end(ap);
+ if (size < 0) {
+ free(formatted);
+ formatted = NULL;
+ }
+ }
+ }
+
+ if (formatted != NULL) {
+ fprintf(stderr, "%s: %s [%s]\n", progname, formatted, infilename);
+ free(formatted);
+ }
+ exit(1);
+}
+
+s32 readaifccodebook(FILE *fhandle, s32 ****table, s16 *order, s16 *npredictors)
+{
+ checked_fread(order, sizeof(s16), 1, fhandle);
+ BSWAP16(*order);
+ checked_fread(npredictors, sizeof(s16), 1, fhandle);
+ BSWAP16(*npredictors);
+ *table = malloc(*npredictors * sizeof(s32 **));
+ for (s32 i = 0; i < *npredictors; i++) {
+ (*table)[i] = malloc(8 * sizeof(s32 *));
+ for (s32 j = 0; j < 8; j++) {
+ (*table)[i][j] = malloc((*order + 8) * sizeof(s32));
+ }
+ }
+
+ for (s32 i = 0; i < *npredictors; i++) {
+ s32 **table_entry = (*table)[i];
+ for (s32 j = 0; j < *order; j++) {
+ for (s32 k = 0; k < 8; k++) {
+ s16 ts;
+ checked_fread(&ts, sizeof(s16), 1, fhandle);
+ BSWAP16(ts);
+ table_entry[k][j] = ts;
+ }
+ }
+
+ for (s32 k = 1; k < 8; k++) {
+ table_entry[k][*order] = table_entry[k - 1][*order - 1];
+ }
+
+ table_entry[0][*order] = 1 << 11;
+
+ for (s32 k = 1; k < 8; k++) {
+ s32 j = 0;
+ for (; j < k; j++) {
+ table_entry[j][k + *order] = 0;
+ }
+
+ for (; j < 8; j++) {
+ table_entry[j][k + *order] = table_entry[j - k][*order];
+ }
+ }
+ }
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ s16 order = -1;
+ s16 npredictors = -1;
+ s32 ***coefTable = NULL;
+ FILE *ifile;
+ progname = argv[0];
+
+ if (argc < 2) {
+ fprintf(stderr, "%s %s\n", progname, usage);
+ exit(1);
+ }
+
+ infilename = argv[1];
+
+ if ((ifile = fopen(infilename, "rb")) == NULL) {
+ fail_parse("AIFF file could not be opened");
+ exit(1);
+ }
+
+ char buf[5] = {0};
+ checked_fread(buf, 4, 1, ifile);
+ if (strcmp(buf, "FORM") != 0) fail_parse("not an AIFF file");
+ checked_fread(buf, 4, 1, ifile);
+ checked_fread(buf, 4, 1, ifile);
+ if (strcmp(buf, "AIFF") != 0 && strcmp(buf, "AIFC") != 0) {
+ fail_parse("not an AIFF file");
+ }
+
+ for (;;) {
+ s32 size;
+ if (!fread(buf, 4, 1, ifile) || !fread(&size, 4, 1, ifile)) break;
+ BSWAP32(size);
+ s32 nextOffset = ftell(ifile) + ((size + 1) & ~1);
+
+ if (strcmp(buf, "APPL") == 0) {
+ checked_fread(buf, 4, 1, ifile);
+ if (strcmp(buf, "stoc") == 0) {
+ u8 len;
+ checked_fread(&len, 1, 1, ifile);
+ if (len == 11) {
+ char chunkName[12];
+ s16 version;
+ checked_fread(chunkName, 11, 1, ifile);
+ chunkName[11] = '\0';
+ if (strcmp(chunkName, "VADPCMCODES") == 0) {
+ checked_fread(&version, sizeof(s16), 1, ifile);
+ BSWAP16(version);
+ if (version == 1) {
+ readaifccodebook(ifile, &coefTable, &order, &npredictors);
+ }
+ }
+ }
+ }
+ }
+
+ fseek(ifile, nextOffset, SEEK_SET);
+ }
+ fclose(ifile);
+
+ if (coefTable == NULL) {
+ execl("./tools/tabledesign", "tabledesign", "-s", "1", infilename, NULL);
+ } else {
+ printf("%d\n%d\n", order, npredictors);
+ for (s32 i = 0; i < npredictors; i++) {
+ for (s32 j = 0; j < order; j++) {
+ for (s32 k = 0; k < 8; k++) {
+ printf("% 5d ", coefTable[i][k][j]);
+ }
+ puts("");
+ }
+ }
+ }
+ return 0;
+}
diff --git a/tools/assemble_font_includes.py b/tools/assemble_font_includes.py
new file mode 100644
index 00000000000..6ccd088e230
--- /dev/null
+++ b/tools/assemble_font_includes.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+import argparse
+import os
+from pathlib import Path
+
+import xml.etree.ElementTree as XmlTree
+
+from makeelf.elf import *
+from audio_common import *
+
+def get_fonts(font_path):
+ return [parse_font(font_file) for font_file in os.listdir(font_path) if file.endswith(".xml")]
+
+def parse_font(font_file):
+ xml = XmlTree.parse(font_file)
+ root = xml.getroot()
+ font = Soundfont()
+ font.fromXML(root)
+ font_name = os.path.basename(font_file)[:-4]
+ if font_name[0:1].isnumeric():
+ idx = font_name.find('_')
+ if idx >= 0:
+ font.idx = int(font_name[:idx])
+ font.name = font_name[idx + 1:]
+ return font
+
+def main(args):
+ fonts = get_fonts(args.xmlpath)
+ os.makedirs(args.outpath, exist_ok=True)
+ for font in fonts:
+ incfile = os.path.join(args.outpath, f"{font.idx}.inc")
+ if not args.quiet:
+ print(f"Generating {incfile} from {args.infont}")
+ write_soundfont_define(font, len(fonts), incfile)
+
+if __name__ == "__main__":
+ # Args
+ parser = argparse.ArgumentParser(add_help=False)
+ parser.add_argument("xmlpath", type=Path, help="Path to soundfont XMLs.")
+ parser.add_argument("outpath", type=Path, help="The path to generate the INC files.")
+ parser.add_argument("--quiet", "-q", action="store_true", help="Suppresses output to standard out.")
+ parser.add_argument("--help", "-h", "-?", action="help", help="Show this help message and exit.")
+ args = parser.parse_args()
+ main(args)
diff --git a/tools/assemble_sequence.cpp b/tools/assemble_sequence.cpp
new file mode 100644
index 00000000000..c4514dab36d
--- /dev/null
+++ b/tools/assemble_sequence.cpp
@@ -0,0 +1,1364 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include