Meanwhile, I tried setADSR(ch, a, d, s, r) to see which part of it works already.(Take note: this is what I believe it works like, right now)
a: sets the time duration for the attack phase in ms
d: sets the time duration for the decay phase in ms
s: sets the volume level (0-1), where the sound will stay at (but because r, is not implemented yet, it will stay at that level forever)
r: the release time is not implemented yet
Workaround for r is:
setVolume to 0 after the note duration
create a function that lerps the value to zero (not sure how this performs during a game)
Open questions:
what are the default values of ADSR to set the channel ADSR back? Probably this is not trivial, because its depending on the note speed, so we would need a command to disable ADSR for a channel again.
is a and d really independent, when setting it? sometimes I feel like a cannot be set freely
Appendix:
It looks like, if ais bigger than 0, the minimum for a is d. Means if you set d to 125 and a to something between 0 and 125, it will be automatically set to 125.
I retested this in a blank program, I was wrong, attack and decay are working fine for me.