Port ZerotoKoops' audio macros to the main oracles-disasm repo - #41
Port ZerotoKoops' audio macros to the main oracles-disasm repo#41mysterypaintwo wants to merge 9 commits into
Conversation
…e Channels to Pulse Channels More thorough audio engine documentation; Renamed audio Square Channels to Pulse Channels 1) pitchOffset macro 2) e0-ef: set channel envelopes - first 7 are software-simulated envelope attacks - last 7 are true hardware envelope attacks
… including accounting for the change in tools/dump/dumpMusic.py
…illa audio engine
| ; e8-ef: same as e0-e7 | ||
|
|
||
| ; f0: does various things for channels 0-5, sets volume and envelope for channel 7, see audio.s for details | ||
| ; f0: unknown |
There was a problem hiding this comment.
Please undo the change to the comment for command $f0, the variable mentioned in the old comment has since been renamed.
| .endm | ||
|
|
||
| ; e0-e7: set envelopes (for channels 0-3) | ||
| ; e0-e7: set envelope (\1 $0-$7: software-simulated attack envelope speed, starting at volume 1 and |
There was a problem hiding this comment.
The new comment here no longer mentions that this only works for channels 0-3. I'm confused why the text mentions volume 15.
|
|
||
| ; 61: wait without changing the previous note or rest, can be used to extend a note or rest (for channels 0-3) | ||
| .macro rest2 ; Unused? | ||
| ; 61: extends the currently playing note/rest without retriggering or otherwise |
There was a problem hiding this comment.
This comment should still mention that command $61 only works for channels 0-3. I think the note about command $60 would be more fitting above that command (and the decay only affects pulse channels). And I'm not sure if it's fair to call it bugged, it looks to me like it was intentionally programmed that way, whether or not it was communicated to the people who were inserting the music.
Summary
Port the following audio macros into
include/musicMacros.s, from ZerotoKoops' music repo:tempofor defining note lengths from a BPM valuem_splitLengthfor subdividing note lengths into arbitrary timing divisionsThese macros are additive and self-contained, and are intended for compatibility with older songs created using these macros, which are now also hosted on the Custom Music wiki page.
No changes to
wram.soraudio.sare required, as these macros only provide timing functionality and do not introduce any new audio engine commands.Details
tempoGiven a BPM value, calculates
Q(frames per beat) and provides a set of eighth-note and twelfth-note length constants, along with their common groupings. This allows songs to specify note lengths using real musical divisions rather than manually calculated frame counts.It also sets
BEATto1.m_splitLengthProvides a way to subdivide note lengths into arbitrary timing divisions that aren't covered by the built-in
tempogroupings.This is retained because it is needed for compatibility with songs using the original timing macros.
Deliberately excluded
The following macros from the external source are not being ported:
noteLenvolbeattarmbeatechobeatvolbeat2volbeat3The associated volume, duty, echo, and phrasing functionality is outside the scope of this port.
The older
wram.s/audio.schanges from the external source are also excluded, including renamed labels, outdated comments, the old$72bank workaround, and thecmdf8/cmdfd/gotoCond/incCodanaming. These changes predate the current branch's engine and documentation work and should not be brought forward.