Command 0x10: Set ADSR
Sets the channel’s envelope (ADSR).
Syntax
0x10, byte adsr1, byte adsr2
Parameters
| Parameter | Type | Description |
|---|---|---|
| adsr1 | byte | Value for the DSP ADSR1 register |
| adsr2 | byte | Value for the DSP ADSR2 register |
Description
Sets the channel’s ADSR1 ($0274+x) and ADSR2 ($0284+x). The new values are written to the DSP at the next key-on.
The driver writes $7F to the GAIN register at key-on, so if bit7 of adsr1 is 0, the envelope is controlled by GAIN (constant at maximum volume) rather than ADSR.
This command takes no time to process; the following event is read within the same tick.