it seems that the transegr
opcode is the one fitted for that task.
a2 transegr 0, i(kDelay), 0, 0, i(katt), 2, 1, i(kdec), -3, i(ksus), i(krel), -3, 0
The code above creates a silence of i(kDelay)
seconds, then rises to 1 in i(katt)
sec, decreases to i(ksus)
in i(kdec)
sec and then is released in i(krel)
sec.
It is a lot of fun to experiment with this, including the type of curve this opcode allows.
Should I have made a mistake, please let me know.