Button
Represents a button on the Launchpad.
Constructor Summary
Public Constructor | ||
public |
constructor(launchpad: Launchpad, note: Number) Creates an instance of Button. |
Member Summary
Public Members | ||
public |
The current color of the button. |
|
public |
The Launchpad this button belongs to. |
|
public |
The note representation of this button. |
|
public |
The x-coordinate of this button. |
|
public |
The y-coordinate of this button. |
Method Summary
Public Methods | ||
public |
darken() Convenience method for setting the button's color to 0. |
|
public |
pulseColor(color: Number) Pulse a color in and out on a button/ |
|
public |
Set the color of this button. |
|
public |
setRgbColor(r: Number, g: Number, b: Number) Set a color on the button with RGB values. |
Public Constructors
Public Members
Public Methods
public darken() source
Convenience method for setting the button's color to 0.
Example:
var button = launchpad.getButton(0, 0)
button.darken()
public pulseColor(color: Number) source
Pulse a color in and out on a button/
Params:
Name | Type | Attribute | Description |
color | Number | The note representation of the color. |
Example:
var button = launchpad.getButton(0, 0)
button.pulseColor(2)
public setColor(color: Number) source
Set the color of this button.
Params:
Name | Type | Attribute | Description |
color | Number | The note representation of the color. |
Example:
var button = launchpad.getButton(0, 0)
button.setColor(2)