From 5c7c43e56b665f42ae402dce213f91d98aa93bb1 Mon Sep 17 00:00:00 2001 From: d_m Date: Wed, 13 Sep 2023 01:15:20 -0400 Subject: [PATCH] fix formatting --- audio-v2.md | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/audio-v2.md b/audio-v2.md index 13d3988..7a831dd 100644 --- a/audio-v2.md +++ b/audio-v2.md @@ -65,32 +65,33 @@ Since each component has its own port, it's also much easier to adjust one without having to fiddle with bit masks, shifting, etc. ## Appending A: proposed specification: - -ADDR SIZE NAME DESCRIPTION -0x30 2 bytes vector callback address to use when note finishes playing -0x32 2 bytes duration duration to play sound in fractional seconds (1ms resolution) -0x34 1 byte attack envelope: attack duration (vol 0-100%, 10ms resolution) -0x35 1 byte decay envelope: decay duration (vol 100-50%, 10ms resolution) -0x36 1 byte sustain envelope: sustain duration (vol 50%, 10ms resolution) -0x37 1 byte release envelope: release duration (vol 50-0%, 10ms resolution) -0x38 2 bytes addr address to read waveform data from -0x3a 2 bytes length length of waveform data to read (in bytes) -0x3c 1 byte volume 4-bit volumes for left/right channels (6.7% resolution) -0x3d 1 byte (unused - reserved for expansion) -0x3e 1 byte pitch 1-bit loop and 7-bit MIDI note (0x00 gives silence) -0x3f 1 byte (unused - reserved for detune) + + + ADDR SIZE NAME DESCRIPTION + 0x30 2 bytes vector callback address to use when note finishes playing + 0x32 2 bytes duration duration to play sound in fractional seconds (1ms resolution) + 0x34 1 byte attack envelope: attack duration (vol 0-100%, 10ms resolution) + 0x35 1 byte decay envelope: decay duration (vol 100-50%, 10ms resolution) + 0x36 1 byte sustain envelope: sustain duration (vol 50%, 10ms resolution) + 0x37 1 byte release envelope: release duration (vol 50-0%, 10ms resolution) + 0x38 2 bytes addr address to read waveform data from + 0x3a 2 bytes length length of waveform data to read (in bytes) + 0x3c 1 byte volume 4-bit volumes for left/right channels (6.7% resolution) + 0x3d 1 byte (unused - reserved for expansion) + 0x3e 1 byte pitch 1-bit loop and 7-bit MIDI note (0x00 gives silence) + 0x3f 1 byte (unused - reserved for detune) ## Appendix B: existing specification -ADDR SIZE NAME DESCRIPTION -0x30 2 bytes vector callback address to use when note finishes playing -0x32 2 bytes position read current position in sample -0x34 1 byte output read envelope loudness at this moment (0x000 to 0x888) -0x35 (unused) -0x36 (unused) -0x37 (unused) -0x38 2 bytes adsr four 4-bit envelope values (attack/decay/sustain/release) -0x3a 2 bytes length length of waveform data to read in bytes -0x3c 2 bytes addr address to read waveform data from -0x3e 1 byte volume 4-bit volumes for left/right channels -0x3f 1 byte pitch 1-bit loop and 7-bit MIDI note + ADDR SIZE NAME DESCRIPTION + 0x30 2 bytes vector callback address to use when note finishes playing + 0x32 2 bytes position read current position in sample + 0x34 1 byte output read envelope loudness at this moment (0x000 to 0x888) + 0x35 (unused) + 0x36 (unused) + 0x37 (unused) + 0x38 2 bytes adsr four 4-bit envelope values (attack/decay/sustain/release) + 0x3a 2 bytes length length of waveform data to read in bytes + 0x3c 2 bytes addr address to read waveform data from + 0x3e 1 byte volume 4-bit volumes for left/right channels + 0x3f 1 byte pitch 1-bit loop and 7-bit MIDI note