diff --git a/audio-v2.md b/audio-v2.md index 0d49016..057e6b0 100644 --- a/audio-v2.md +++ b/audio-v2.md @@ -62,6 +62,8 @@ specified in 10ms increments (e.g. `0x03` is 30ms). The S port for So with a value of `0xff` the note would hold as long as possible, and with `0x00` the release would occur just after the decay ends. +(If the duration is short parts of the envelope may be truncated.) + Since each component has its own port, it's also much easier to adjust one without having to fiddle with bit masks, shifting, etc. @@ -73,7 +75,7 @@ one without having to fiddle with bit masks, shifting, etc. 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) + 0x36 1 byte sustain envelope: sustain fraction (vol 50%, x/255 of free time) 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)