Command 0x10: Set ADSR

Sets the channel’s envelope (ADSR).

Syntax

0x10, byte adsr1, byte adsr2

Parameters

ParameterTypeDescription
adsr1byteValue for the DSP ADSR1 register
adsr2byteValue 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.

See also

Sequence data structure
Command 0x1C
Command 0x21