new Envelope()
The Envelope class makes a rectangular space in which instances of the EnvelopeNode can be created, edited, and deleted.
Methods
draw(newX)
Draws the instance of the Envelope class. This includes the outer rectangle, the lines between each envelope node, and the nodes themselves.
Parameters:
Name | Type | Description |
---|---|---|
newX |
Number | An altered value of the envelope's |
load(str)
Load an envelope from an input string specifying the type of musical dimension.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The string specifying the type of musical dimension. |
onclick(str, _grid, _sonic)
onclick method for Envelope class
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The type of node to be created |
_grid |
object | The grid object |
_sonic |
object | The sonic object |
push_sorted(time, value)
Push a time/value pair onto this envelope's data, maintaining sorted order.
Parameters:
Name | Type | Description |
---|---|---|
time |
number | The time of the pair to add. |
value |
number | The value of the pair to add. |
toggle_active()
Toggle the active status of this envelope.
touch_check(touchType, str, _grid, _sonic)
Touch check method for Envelope class
Parameters:
Name | Type | Description |
---|---|---|
touchType |
string | touch type ('touchStarted', 'touchMoved', 'touchEnded') |
str |
string | string parameter |
_grid |
Object | grid object |
_sonic |
Object | sonic object |