Banner
Views: 854,156,743
Time:
25 users online: Amine Retro, Ashley Alexander, AyGaAlPa, Cartesius, Centipede, Chosentw0, codfish1002, Dippy, Duraner Hawkeye, Exodustx0, ExONightZ, Green Jerry, Infinity, KaidenThelens, kamekku14, kellykelster,  KevinM, LadiesMan217, Mario is the best, mikairanutshack, Nadir, RareMojo, Raymondsze, Synergic, viniciuskombat - Guests: 43 - Bots: 52 Users: 47,134 (2,480 active)
Latest: Bruno_Peixoto
Tip: Create a thread for your hack in the Works in Progress once you have enough screenshots/videos to show.Not logged in.
ADSR Command
Forum Index - SMW Hacking - SMW Hacking Help - Tutorials - Old Tutorials - ADSR Command
Pages: « 1 »
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. :P

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. :)
is the command used by the bramble song, true?
even if the song doesn't uses the same sample, it seems equal, with a bit of difference :D

that obsessed me a time D:

--------------------
My deviantART
My Youtube channel
My avatar
Watch, i made a Super Mario 64 level
Yes, it does use that command. Also, I googled ADSR and found this on Wikipedia:



A=Attack
D=Decay
S=Sustain
R=Release

Attack:
How quickly the sound reaches full volume after the sound is activated.

Decay:
How quickly the sound drops to the sustain level after the initial peak.

Sustain:
The "constant" volume that the sound takes after decay until the note is released. Note that this parameter specifies a volume level rather than a time period.

Release:
How quickly the sound fades when a note ends.
cool

how many song for addmusic uses this? only "brambles"??

--------------------
My deviantART
My Youtube channel
My avatar
Watch, i made a Super Mario 64 level
All songs where it says "N-SPC Patch" and probably some others.
Ah, that explains the point of $YY. Experimented with it a bit, but never really paid enough attention to realize it has to do with ADSR.

Nice one Ice Man.
Wow looking at page 3 sometimes really makes sense...

Thanks for the tutorial Ice Man it really helped.

--------------------
Obsoleted by interactive AMK readme.

--------------------
Your layout has been removed.
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - Tutorials - Old Tutorials - ADSR Command

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy