Class EnvGraph

Envelope graph drawing module.

Subclass of Graph for drawing common envelope graphs. Includes DADSR, ADSR, ASR and AR (Perc).

Info:

  • Release: v1.0.1
  • Author: Mark Eats

Methods

EnvGraph:new_dadsr (x_min, x_max, y_min, y_max, delay, attack, decay, sustain, release, level, curve) Create a new DADSR EnvGraph object.
EnvGraph:edit_dadsr (delay, attack, decay, sustain, release, level, curve) Edit a DADSR EnvGraph object.
EnvGraph:new_adsr (x_min, x_max, y_min, y_max, attack, decay, sustain, release, level, curve) Create a new ADSR EnvGraph object.
EnvGraph:edit_adsr (attack, decay, sustain, release, level, curve) Edit an ADSR EnvGraph object.
EnvGraph:new_asr (x_min, x_max, y_min, y_max, attack, release, level, curve) Create a new ASR EnvGraph object.
EnvGraph:edit_asr (attack, release, level, curve) Edit an ASR EnvGraph object.
EnvGraph:new_ar (x_min, x_max, y_min, y_max, attack, release, level, curve) Create a new AR (Perc) EnvGraph object.
EnvGraph:edit_ar (attack, release, level, curve) Edit an AR (Perc) EnvGraph object.
EnvGraph:get_delay () Get delay value.
EnvGraph:get_attack () Get attack value.
EnvGraph:get_decay () Get decay value.
EnvGraph:get_sustain () Get sustain value.
EnvGraph:get_release () Get release value.
EnvGraph:get_level () Get level value.
EnvGraph:get_curve () Get curve value.


Methods

EnvGraph:new_dadsr (x_min, x_max, y_min, y_max, delay, attack, decay, sustain, release, level, curve)
Create a new DADSR EnvGraph object. All arguments optional.

Parameters:

  • x_min number Minimum value for x axis, defaults to 0.
  • x_max number Maximum value for x axis, defaults to 1.
  • y_min number Minimum value for y axis, defaults to 0.
  • y_max number Maximum value for y axis, defaults to 1.
  • delay number Delay value, defaults to 0.1
  • attack number Attack value, defaults to 0.05.
  • decay number Decay value, defaults to 0.2.
  • sustain number Sustain value, accepts 0-1, defaults to 0.5.
  • release number Release value, defaults to 0.3.
  • level number Level value, accepts y_min to y_max, defaults to 1.
  • curve string or number Curve of envelope, accepts "lin", "exp" or a number where 0 is linear and positive and negative numbers curve the envelope up and down, defaults to -4.

Returns:

    EnvGraph Instance of EnvGraph.
EnvGraph:edit_dadsr (delay, attack, decay, sustain, release, level, curve)
Edit a DADSR EnvGraph object. All arguments optional.

Parameters:

  • delay number Delay value.
  • attack number Attack value.
  • decay number Decay value.
  • sustain number Sustain value, accepts 0-1.
  • release number Release value.
  • level number Level value, accepts y_min to y_max.
  • curve string or number Curve of envelope, accepts "lin", "exp" or a number where 0 is linear and positive and negative numbers curve the envelope up and down, defaults to -4.
EnvGraph:new_adsr (x_min, x_max, y_min, y_max, attack, decay, sustain, release, level, curve)
Create a new ADSR EnvGraph object. All arguments optional.

Parameters:

  • x_min number Minimum value for x axis, defaults to 0.
  • x_max number Maximum value for x axis, defaults to 1.
  • y_min number Minimum value for y axis, defaults to 0.
  • y_max number Maximum value for y axis, defaults to 1.
  • attack number Attack value, defaults to 0.05.
  • decay number Decay value, defaults to 0.2.
  • sustain number Sustain value, accepts 0-1, defaults to 0.5.
  • release number Release value, defaults to 0.3.
  • level number Level value, accepts y_min to y_max, defaults to 1.
  • curve string or number Curve of envelope, accepts "lin", "exp" or a number where 0 is linear and positive and negative numbers curve the envelope up and down, defaults to -4.

Returns:

    EnvGraph Instance of EnvGraph.
EnvGraph:edit_adsr (attack, decay, sustain, release, level, curve)
Edit an ADSR EnvGraph object. All arguments optional.

Parameters:

  • attack number Attack value.
  • decay number Decay value.
  • sustain number Sustain value, accepts 0-1.
  • release number Release value.
  • level number Level value, accepts y_min to y_max.
  • curve string or number Curve of envelope, accepts "lin", "exp" or a number where 0 is linear and positive and negative numbers curve the envelope up and down, defaults to -4.
EnvGraph:new_asr (x_min, x_max, y_min, y_max, attack, release, level, curve)
Create a new ASR EnvGraph object. All arguments optional.

Parameters:

  • x_min number Minimum value for x axis, defaults to 0.
  • x_max number Maximum value for x axis, defaults to 1.
  • y_min number Minimum value for y axis, defaults to 0.
  • y_max number Maximum value for y axis, defaults to 1.
  • attack number Attack value, defaults to 0.05.
  • release number Release value, defaults to 0.3.
  • level number Level value, accepts y_min to y_max, defaults to 1.
  • curve string or number Curve of envelope, accepts "lin", "exp" or a number where 0 is linear and positive and negative numbers curve the envelope up and down, defaults to -4.

Returns:

    EnvGraph Instance of EnvGraph.
EnvGraph:edit_asr (attack, release, level, curve)
Edit an ASR EnvGraph object. All arguments optional.

Parameters:

  • attack number Attack value.
  • release number Release value.
  • level number Level value, accepts y_min to y_max.
  • curve string or number Curve of envelope, accepts "lin", "exp" or a number where 0 is linear and positive and negative numbers curve the envelope up and down, defaults to -4.
EnvGraph:new_ar (x_min, x_max, y_min, y_max, attack, release, level, curve)
Create a new AR (Perc) EnvGraph object. All arguments optional.

Parameters:

  • x_min number Minimum value for x axis, defaults to 0.
  • x_max number Maximum value for x axis, defaults to 1.
  • y_min number Minimum value for y axis, defaults to 0.
  • y_max number Maximum value for y axis, defaults to 1.
  • attack number Attack value, defaults to 0.05.
  • release number Release value, defaults to 0.3.
  • level number Level value, accepts y_min to y_max, defaults to 1.
  • curve string or number Curve of envelope, accepts "lin", "exp" or a number where 0 is linear and positive and negative numbers curve the envelope up and down, defaults to -4.

Returns:

    EnvGraph Instance of EnvGraph.
EnvGraph:edit_ar (attack, release, level, curve)
Edit an AR (Perc) EnvGraph object. All arguments optional.

Parameters:

  • attack number Attack value.
  • release number Release value.
  • level number Level value, accepts y_min to y_max.
  • curve string or number Curve of envelope, accepts "lin", "exp" or a number where 0 is linear and positive and negative numbers curve the envelope up and down, defaults to -4.
EnvGraph:get_delay ()
Get delay value.

Returns:

    number Delay value.
EnvGraph:get_attack ()
Get attack value.

Returns:

    number Attack value.
EnvGraph:get_decay ()
Get decay value.

Returns:

    number Decay value.
EnvGraph:get_sustain ()
Get sustain value.

Returns:

    number Sustain value.
EnvGraph:get_release ()
Get release value.

Returns:

    number Release value.
EnvGraph:get_level ()
Get level value.

Returns:

    number Level value.
EnvGraph:get_curve ()
Get curve value.

Returns:

    string or number Curve value.
generated by LDoc 1.4.6 Last updated 2020-03-28 23:45:19