new EnvelopeNode()
The EnvelopeNode class makes small draggable nodes or circles in a rectangular space that we refer to as an Envelope. Lines are drawn from one instance of EnvelopeNode to the next, and so can be used to determine or shape the profile or production of some aspect of musical events, such as their volume.
Methods
compare_to(fruit) → {String}
Method to compare this node with surrounding nodes.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
fruit |
Object | [description] Properties
|
Returns:
[description]
- Type
- String
draw()
Draw the EnvelopeNode on the canvas.
move(touchType, theEnv, theNodeIdx, theGrid, theSonic)
Method to move the node.
Parameters:
Name | Type | Description |
---|---|---|
touchType |
string | Type of touch event (touchStarted, touchMoved, touchEnded). |
theEnv |
object | The Envelope object that this node belongs to. |
theNodeIdx |
number | The index of this node within the Envelope's nodes array. |
theGrid |
object | The Grid object that this node belongs to. |
theSonic |
object | The Sonic object that this node belongs to. |
toggle_being_moved()
Toggles the "beingMoved" property of the node.
touch_check() → {boolean}
Checks if the mouse touch is within the bounds of the node.
Returns:
Returns true if the mouse touch is within the node bounds, else returns false.
- Type
- boolean