Music

From ZeldaHacking Wiki
Jump to navigation Jump to search

This page is the entry point for everything related to music and sound effects in the disassembly for both The Legend of Zelda: Oracle of Ages and Oracle of Seasons.

If you're new here, pick whichever of the following matches what you're trying to do:

Page What it's for
Music Format The technical reference: sound channels, the index/data layout, and the full command reference for channel data (notes, volume, envelopes, vibrato, etc). Read this if you're editing music/SFX data directly, or want to understand how the engine actually works under the hood.
MML Syntax A quick reference page for the Music Macro Language (MML) syntax for using the community mml2wla tool to generate WLA (.s) files.
Creating Music A start-to-finish tutorial for composing a new song for the Oracles' audio engine.
Adding Custom Music A tutorial for taking a finished .s music file, be it your own, or one downloaded from Custom Music. It covers hooking custom music into a ROM/hack, including which bank it needs to go in.
Custom Music A community-maintained table of custom tracks made for this engine, with audio previews, tags, and downloadable .s files ready to drop into a hack.

Quick orientation

Music and sound effects use the exact same underlying system: the command format, 8 logical channels, and even the engine code (code/audio.s). If you just want the short version: the engine reads each song/sound as a tiny bytecode script (commands for pitch, rest, volume, envelope, vibrato, and so on), and three files per game (soundPointers.s, soundChannelPointers.s, soundChannelData.s) wire a given piece of music or sound effect to an index and a set of channels. All of that is covered in full on Music Format.

For general background on how Game Boy Color sound hardware works (independent of this engine specifically), see https://gbdev.gg8.se/wiki/articles/Gameboy sound hardware.