Since I wasn't able to find something really useful about it here I decided to write something about the $ED command. (originally written on PukiWikie but translated and rewritten for proper understanding by me)
The ADSR Command
The $ED command allows you to add sharpness to an instrument, fading and much more.
For more details see picture below:
(1) Wait until the tone reaches the maximum volume. (Red)
(2) Then add some sharpness to it. (Blue)
(3) Delay of the tone. (Green)
(4) Fading of the tone. (maximum volume is 1/10 for the specified time)
$ED $XX $YY
(1) & (2) are commands in $XX
(3) & (4) are commands in $YY
See table for values and usage.
Let's say you want the length of 0,38 seconds (380 msec).
(1) = 5 from the table.
$XX works as follows:
Format:
(2)(1)
Example:
(1) = 5, (2) = 3 would be $65 in that case.
(3x10 = 30 → 60 + 5 = 65)
All you do is mulitply (2) by 10 and add (1) to it.
$YY works as follows:
Format:
(3)(4)
Example:
(3) = 5, 4 = 1D would be $BD in that case.
(5x2 = A → Ax10 = A0 → A0 + 1D = BD)
This is a bit more complex but still easy after all, since you can use the calculator for it.
All you do is mulitply (3) by 2, then mulitply the result by 10 and add (4) to it.
Credtis for original explanation and images go to PukiWiki.
I hope this helps using $ED command.
EDIT: Images removed because of dead links.
The $ED command allows you to add sharpness to an instrument, fading and much more.
For more details see picture below:
(1) Wait until the tone reaches the maximum volume. (Red)
(2) Then add some sharpness to it. (Blue)
(3) Delay of the tone. (Green)
(4) Fading of the tone. (maximum volume is 1/10 for the specified time)
$ED $XX $YY
(1) & (2) are commands in $XX
(3) & (4) are commands in $YY
See table for values and usage.
Let's say you want the length of 0,38 seconds (380 msec).
(1) = 5 from the table.
$XX works as follows:
Format:
(2)(1)
Example:
(1) = 5, (2) = 3 would be $65 in that case.
(3x10 = 30 → 60 + 5 = 65)
All you do is mulitply (2) by 10 and add (1) to it.
$YY works as follows:
Format:
(3)(4)
Example:
(3) = 5, 4 = 1D would be $BD in that case.
(5x2 = A → Ax10 = A0 → A0 + 1D = BD)
This is a bit more complex but still easy after all, since you can use the calculator for it.
All you do is mulitply (3) by 2, then mulitply the result by 10 and add (4) to it.
Credtis for original explanation and images go to PukiWiki.
I hope this helps using $ED command.
EDIT: Images removed because of dead links.